Questions tagged as 'java'

1
answer

Someone to explain what this prints

Someone is kind enough to explain to me what these two lines of code print in java: System.out.println(5&6) System.out.println(2|1)     
asked by 02.06.2017 / 21:00
2
answers

Problem Registering User

In a job for the uni does not register the user. The way to check it is with a message "User added." But I have not gotten that function. Compile and show no errors I used WindowBuilder for the interface. I attach the code of the interface an...
asked by 28.05.2017 / 19:25
4
answers

Word reserved this as parameter

I have the following code: public abstract class Notific<T extends Notifi> { public final void send() { NotificationEventPublisherFactory.createInstance().publishEvent(this); } } What is this? the method? the class?...
asked by 21.05.2017 / 15:47
2
answers

Error connecting Java with SQL

I have a problem with this code: CODE package restaurante2; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.Statement; import java.sql.SQLException; //import.java.util.*; publ...
asked by 25.03.2017 / 04:36
3
answers

How to display Firebase data on Android

Good, I have some data in my BDB of FireBase (Name, Surname, DNI) that are created based on a Mail. I've been looking for how to show that data on an Android screen but I can not find anything, someone has some idea of how I could show them ?...
asked by 04.04.2017 / 10:33
1
answer

Error Exception Null

I have this section of code where I need to add those variables to my database, but once I send the data, it tells me the error null Here I make my connections package lavanderia.Modelo; import java.sql.Date; import java.util.ArrayList; /**...
asked by 20.04.2017 / 05:48
2
answers

annotations in spring-boot

Reviewing a bit about the concepts of spring-boot, I saw that there is @Component which is divided into 3 @Controller @Service @Repository Reading a little, each one has an end, come to the conclusion that @Controller -->sirve para las...
asked by 26.04.2017 / 14:45
1
answer

does someone help me with this error in java?

Basically I have a problem that says: When it comes to autographing, the queue of people who want one of their own can be whole blocks. But it happens that the people who make the tail of Serena's autographs are very impatient. If, when it...
asked by 19.03.2018 / 20:08
1
answer

When I save a phrase in string, it only saves me the first word

When I save a sentence in a String, it only saves me the first word. How can I solve this? Customer code: public static void main(String[] args) { String fraseResult; try(ServerSocket socketServidor = new Server...
asked by 17.03.2018 / 13:18
2
answers

Using @Mock in Java

When using @Mock my @Test does not work although validating through a simple debug works completely, I do not understand how to use the Mocks and what I am testing is very simple: import org.junit.Test; import org.junit.runner.RunWith; import...
asked by 19.03.2018 / 11:46