Questions tagged as 'java'

1
answer

How to add a converter (GSON) to retrofit in netbeans for javaFX project?

As you already read above, I am trying to configure a converter to retrofit , all this in netbeans, for android it will be used and there it will be added with Gradle and in netbeans with maven but at the time of doing the class w...
asked by 21.04.2018 / 20:49
1
answer

Object arrangement by several Classes?

I am a beginner in terms of OOP, and right now I am doing a code for a veterinarian where I have to make an arrangement of objects and put animal data. This is the parent class (which, as you can see is Abstract) package veterinaria;...
asked by 22.04.2018 / 18:07
1
answer

Is it possible to make a case switch by entering a value of type char?

public static void main(String[] args) { World hoja = new World(); Turtle tortu = new Turtle(hoja); Scanner lector = new Scanner(System.in); String opcion = ""; char opc; do{...
asked by 04.04.2018 / 07:55
1
answer

Failed to compare the values of a JSpinner. JFrame

I have 2 spinners, each one with its corresponding values taken from a string: SpinnerListModel pal = new SpinnerListModel(palabras ); spinner = new javax.swing.JSpinner(pal); SpinnerListModel word = new SpinnerListMode...
asked by 03.05.2018 / 13:10
1
answer

LogIn HQL Can you compare an object with two variables?

The goal is to make a LogIn through an HQL, I am currently at this point of the code: public boolean LogIn(String nickname, String password){ boolean inAnswer = false; try{ inAnswer = true;...
asked by 17.04.2018 / 09:59
2
answers

NullPointer when executing a PreparedStatement

I am trying to generate a ArrayList of users from a DB , the case is that when executing the PreparedStatement it returns a NullPointer and it tells me that the connection object is null, it is something that does not...
asked by 16.04.2018 / 09:13
2
answers

Java Spring connection with wamp. I do not insert the record

I am learning the Java Spring Framework and following a tutorial I made some classes with the repsective attributes that coincided with the ones I have mounted in the database. And what I intend is to the data in the Database of my WAMP Ser...
asked by 20.08.2018 / 13:16
1
answer

doubt with Querys - BDOO

I have the following code: In the entity Article I have the following @NamedQuery @NamedQuery(name="Article.aumentapreu", query="UPDATE Article a SET a.preu=a.preu*:quantitat") And in manager class article: /...
asked by 20.03.2018 / 17:54
1
answer

Problem with date format

I am working on a mobile application in which I keep data in my device database, one of those fields is the date and time but when I want to insert these fields from my application to Oracle, it marks me an error the format of the date which I h...
asked by 20.03.2018 / 21:59
2
answers

Method to filter Java figures

I'm trying to create a Java method that filters figures as follows: The method asks for two int (int n, int x). If n is, for example, 4232 and x is 2, n will be filtered making all 2 of n change to zeros, that is; filterCifrasX (4232, 2) returns...
asked by 08.03.2018 / 00:22