Questions tagged as 'java'

2
answers

Convert a double digit to String

I'm trying to convert a number (Double) entered by keyboard into String, example = > 8.3 = > eight with three I created a scanner class to enter the double and I understood that with valueOf I could do it, but I must be doing somethi...
asked by 02.01.2017 / 22:23
1
answer

Load image and text of each ITEM (ListView) in the same Activity

How can I make the text and the image of my ListView inside that Activity? (Each ITEM its image and text, not in all the same, obviously) My code: listViewPersonas.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override...
asked by 04.01.2017 / 19:13
1
answer

Error: can not find symbol method setLatestEventInfo

I have the following problem in my code, when I try to compile it marks me the following error:    error: can not find symbol method   setLatestEventInfo (NotifyService, CharSequence, CharSequence, PendingIntent) this is my code: pu...
asked by 05.01.2017 / 02:21
2
answers

Error removing student media and / or failed subjects in Java

I am doing an exercise for class in which you have to ask for the number of students and the subjects of each student. Once this information is known, the 3 notes per module are requested and the average is made only if you have all approved (th...
asked by 15.01.2017 / 12:29
1
answer

Error in Java zombie game

I have a large program with 5 classes, in which every time I run this error comes up in NetBeans : These are the different classes: -CLASS 1, Batoilkingdead : public static final int NUMERO_DE_VIDAS = 3; private static final...
asked by 21.12.2016 / 13:00
1
answer

Get the currency defined in Android

Is it possible to obtain in any way the currency that the user uses, that is, the symbol: $, € .... ?     
asked by 01.12.2016 / 15:27
3
answers

Abstract classes

Whenever we want to overwrite a method of an abstract class from a subclass, this method must be abstract or can be overwritten on a normal method of an abstract class. Thanks.     
asked by 02.12.2016 / 21:06
2
answers

Help with Java (POO)

public class CFecha { //ATRIBUTOS int Dia; int Mes; int Año; //CONSTRUCTORES public CFecha(int pdia, int pmes, int paño){ Dia=pdia; Mes=pmes; Año=paño; } //MODIFICADORES public v...
asked by 05.12.2016 / 05:38
1
answer

Read from a file and assign to array [] [] in Java [closed]

How to read a txt file with an 8x11 matrix that has several char and put it in char [][] ? The txt can have this form: %,%,%,%,%,%,%,%,%,%,% %,%,%,h,o,l,a,%,%,%,% %,%,%,%,%,%,%,%,%,%,% %,%,%,m,u,n,d,o,%,%,% %,%,%,%,%,%,%,...
asked by 03.12.2016 / 18:59
2
answers

Error generating APK: "All com.google.android.gms libraries must use the exact same version specification"

When I try to generate the APK in Android studio I get this error message: Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: dupl...
asked by 20.02.2017 / 16:17