Questions tagged as 'java'

1
answer

JAVA - Netbeans - FOR Cycle

I'm starting in java language, with netbeans. I do some exercises, I just can not understand how the next cycle works: if (num<=1){ return false; }else{ int prueba; int contador=0; prueba=(int)Ma...
asked by 08.12.2018 / 17:28
1
answer

Explanation java code

import java.io.*; import java.util.*; public class E11 extends Thread { public void run() { ArrayList<Integer> primos = new ArrayList<Integer>(); boolean primo = true; for (int i = 1; i <= 100; i++) { for (Inte...
asked by 05.12.2018 / 19:35
1
answer

Differing Priorities of Mapbox Location on Android

To get positions with the control mapbox we use LocationEngine I see that you can specify the priority, ie the sampling of location data. locationEngine = LocationSource.getLocationEngine(this); locationEngine.setPriority(Locatio...
asked by 30.05.2017 / 09:51
2
answers

JAVA: Error: the main class Confirming2_App was not found or loaded

I have made a java GUI application with Swing and Netbeans. I can run it without problems from Netbeans or from console inside the directory of the application, nevertheless when taking the .jar to another directory (for example the desktop) I g...
asked by 30.05.2017 / 16:23
1
answer

I can not understand why I get this error ArrayIndexOutOfBoundsException: 6

I'm getting an Exception in thread "main"    java.lang.ArrayIndexOutOfBoundsException: 6 exactly at this point.       at primeraclase.PrimeraClase.main (Seat 14H FirstClass.java:81 It is supposed that it should reach up to 60 because the...
asked by 17.11.2017 / 01:42
1
answer

Netbeans, java and database. Problems when inserting

Hello, I have this part of the code: public void inserir(Assignatura as) throws GestorException { //TODO codificar el metode inserir String sentenciaSQL = null; PreparedStatement elm = null; try{ elm =...
asked by 06.03.2018 / 18:09
1
answer

Problem with Java switch

I have a menu with a switch with 3 options that does the following: Data Capture Data query Finish In option 1 the user is requested all the necessary data. In option 2 I want to show this data that was saved. The question is, how...
asked by 04.03.2018 / 23:40
2
answers

can a String be converted into a Date list in java?

Within my class, I have the following method public void buscaDetalleIncidencia() { System.out.println("ENTRO AL METODO BUSCA DETALLE POR AÑO/MESSS"); muestraTablaDetalle = true; incidenciaAnioMesDet = anio...
asked by 07.03.2018 / 19:19
1
answer

Get a list of the mime-types supported on Android

Is it possible to obtain a list of the mime-types supported on the device? I'm looking at MimeTypeMap but I do not see how to implement it     
asked by 07.03.2018 / 18:43
1
answer

Error: Attempt to invoke virtual method 'java.io.FileOutputStream

I have an error that I do not understand because it shows, I have two classes one is the class called Dialogue that extends from a DialogFragment, in this class I have a method called onClickSavePersona , this class uses it to create a dialog b...
asked by 05.03.2018 / 16:45