Questions tagged as 'java'

1
answer

n = 1 in the while condition returns no value

Good evening. I'm starting to learn java and did a swing program that calculates the factorial of a number. I did using while, and in the condition, I tried to do with the condition (n >= 1) (I'll put the code snippet below), and th...
asked by 10.01.2017 / 00:55
1
answer

Add multiple indexes of a vector as parameter

I'm starting in JAVA. I created two classes, the Pessoa class, which receives the following parameters in instantiation of a new object: public Pessoa(String nome, int idade, char sexo) And the class Livro : public Livro(Stri...
asked by 23.01.2017 / 16:58
1
answer

Doubts about java.util.Date

Someone can explain to me what this will return: java.util.Date date = new java.util.Date(); java.util.Date date1 = date; java.util.Date date2 = (java.util.Date(date.clone())); System.out.println(date==date1); System.out.println(date==date2);...
asked by 23.01.2017 / 23:21
1
answer

Doubts with DAO method

I have a question about a generic DAO being used in a testing project with Vraptor. This dao, works normal in my requests, but when used in a unit test, the same problem occurs when trying to remove: @Before public void init(){ EntityMa...
asked by 05.12.2016 / 12:37
1
answer

Error trying to generate apk ionic v2

   Command: ionic build android --prod Environment Variables:    ANDROID_HOME C:\Android\sdk    CLASSPATH .;%JAVA_HOME%    JAVA_HOME C:\Program Files (x86)\Java\jdk1.8.0_121    Path ;%JAVA_HOME%\bin    Error:...
asked by 07.02.2017 / 16:41
2
answers

Persistence and readability of Firebase data

I would like to have a data structure in the Firebase realtime database look like this: {   "codigo": "01",   "Data": "1234567890",   "usuario": "{codigo : 01, nome : Rafael}" } I have the class: class Consulta { String codigo;...
asked by 07.02.2017 / 18:01
1
answer

Spring Boot application not initializing in Heroku

I have the following open source application: people-on-map-site . And I have an account with Heroku and this project integrated with the GitHub repository. However, when Deploy appears, these messages appear in the logs: The build is...
asked by 10.12.2016 / 21:15
1
answer

Select hibernate criteria with unmapped entity

How do I make a select, using the criteria and bring an unmapped entity, would be multiple joins, and sometimes bring certain fields and others not.     
asked by 13.12.2016 / 20:06
1
answer

How do I get more than one value from the database and save more than one returned value in a ComboBox? [closed]

I have a question that is the following, when I make an appointment in the bank it can return me more than two names, and I can only get one. The idea is to filter the names of doctors by type of doctor (Neurosurgeon, among others) and then pick...
asked by 16.11.2016 / 01:46
1
answer

Two Intents starting the same Activity

I have a button to add a Tip and I have another button to edit the already created Tip. I would like to use the same Creation Activity, when it is for editing it would pull the data already created. I'm in doubt how to make the Intent code, I ca...
asked by 16.11.2016 / 00:24