Questions tagged as 'java'

1
answer

HashSet exactly how it works [duplicated]

Suppose I have this main: import java.util.*; public class Main { public static void main(String[] args) { HashSet<Persona> conjuntoPersonas= new HashSet<>(); Persona p1 = new Persona("Jose", "1"...
asked by 06.12.2017 / 12:26
3
answers

Erroneous connection of Android with SQLServer

I am starting to program a small project in Android Studio. I want to make a query to the base, in case the connection fails it gives me a message in a Toast: Network error IDException: failed to connect to /ANDRESPC\SQLEXPRESS (port 1433): co...
asked by 20.09.2017 / 05:12
3
answers

Variable does not increase me and I do not see the fault

Good, I am comparing a vector with each of the rows of a matrix. I have created a variable to indicate when it has reached the end of the vector so that it does not continue comparing. This variable (called coincidence) increases every time I fi...
asked by 16.09.2017 / 18:44
2
answers

Error fixing objects in java

I have a question about this error (I'm starting with java):    Exception in thread "main" java.lang.RuntimeException: Uncompilable   source code - Erroneous tree type: principal.Patent at   principal.Principal.main (Principal.java.20)   C: \...
asked by 28.09.2017 / 01:44
3
answers

doubt with instance of objects in java

I have a question about instantiating objects in Java. If I have two classes and one extends to the other, when I make an instance of any of them with: A c = new B(); what I do with this is instantiate class B but with the attributes of cla...
asked by 24.01.2018 / 18:50
1
answer

Running a file formatted in UTF-8 with javac

I tried to run a .java file that I did in Eclipse , and I missed a lot of errors. The file I programmed is encoded in UTF-8. When executing this command in the CMD of Windows : javac C:\ProgramasJava\Main.java The output in console...
asked by 09.10.2017 / 14:25
2
answers

Change the context (URL Root) of a web project in eclipse

I'm with a project, that when you run it in the eclipse, you leave it listening in http://localhost:8080/nombre_del_proyecto/ . What I want is that now run in http://localhost:8080/otro_nombre/ . Where do you change the name of th...
asked by 31.08.2017 / 18:22
1
answer

Open app when detecting a geo Uri on Android, get values

How can you make the app open? by clicking on a link from the web browser, chrome, firefox ... a link of type geo:... Geo URI scheme geo:37.786971,-122.399677 What I have: Capture when the user clicks on a geo:......
asked by 14.11.2017 / 17:28
2
answers

Determine how many vowels a chain has in java [closed]

Implement, using the String class, an application that counts the number of vowels in a text. The algorithm that I have designed is the following: However, when I try to code the algorithm, everything goes fine until I try to buy wit...
asked by 10.02.2018 / 09:42
1
answer

Run the same Java thread twice [closed]

I have a problem and I look for help. I need to execute many times the same thread and I get the error (java.lang.IllegalThreadStateException) Does anyone know any way to do it?     
asked by 09.02.2018 / 18:30