Questions tagged as 'java'

3
answers

How can I get decimal points in java?

I need to show the user an amount to pay, but the result returned is the following 1700.292 , the user will find it an error. You need to show the exact amount separated by points - > 1,700,292    Correct result: 1,700,292       Erron...
asked by 23.03.2018 / 04:13
1
answer

Alertdialog, separate the title of the message

I am using the Holo_Dialog theme in an AlertDialog, the problem is that the title comes out below the line of separation, how could I put the title above ?, or if I use the theme Theme_AppCompat_Dialog_MinWidth, how could I separate the title fr...
asked by 04.03.2018 / 01:38
1
answer

Access a method of a subclass from an arraylist?

I'm doing a pretty simple program to learn some things from java and I have the following super class: public abstract class Persona { //Atributos protected String nombre; protected String apellido; protected int edad; /...
asked by 01.02.2018 / 18:46
2
answers

Extract integers from a JAVA string

I have this string ( LIXA ABIMERHI JUAN JOSE,DISEÑO DE INTERFACES,90,88,81,90 ) and they are asking me: Read the data by lines using the split method of the class String separate the fields. Convert the 4 strings of gra...
asked by 24.11.2017 / 15:21
2
answers

Doubt about float data type in Java

I'm learning how to program, and I'm doing data type exercises. I'm supposed to find errors in the code, and here I am: 9.- float f1 = 13.5; 10.- float f2 = 8f; I really have a bit of a mess, because I do not know if the failure is that e...
asked by 11.02.2018 / 19:03
3
answers

Scroll when focusing on a Component X JAVA

I find myself with the following dilemma suppose I have a control in this case a EditText and below I have a Button which allows me to follow the course of the app, Now my problem is that I want that when you focus or click the...
asked by 23.02.2018 / 18:27
1
answer

Multiple filtering in an ArrayList

I have a method that receives an Object of type List of a class of its own that is called Pallet. The class Pallet has a creation date, an article, an id, a warehouse ... etc. The method    filterPalletWithDataretorna (List lis...
asked by 03.10.2017 / 15:29
2
answers

Print data belonging to a TreeMap

In the consultas() method, how could you print the student's name and grades? Until now, what it prints are memory addresses, and not the name and qualifications. Note: The map that receives this method is a map that returns a met...
asked by 27.09.2017 / 01:20
2
answers

Copy TextView on Clipboard when pressed

I want to make that when I clicked on a TextView in andorid studio it was copied to the clipboard, I tried to put the android:longClickable="true" line in the text view tag as I read on a page, but nothing. I have changed in the androi...
asked by 10.04.2018 / 16:13
2
answers

Item of one color or another (RecyclerView)

What I want to achieve is the following, that an element is painted in one color and the next in another: ----------- item0: azul ----------- item1: amarillo ----------- item2: azul ----------- item3: amarillo ----------- ... and thus witho...
asked by 20.06.2017 / 16:40