Questions tagged as 'java'

1
answer

Put multiple classes in the same file

In my project I have the class main and created new Java class files with NetBeans to define the objects there. I can only use one of the classes with main , others can not even call the methods. Is it anyway? Can I only use%...
asked by 16.10.2017 / 23:29
1
answer

How to securely save a private key?

I'm developing an application for Android / iOS mobile devices, in this application the communication with the server is done in encrypted form. The user application, when first started, generates a public / private key. The public key is sent t...
asked by 05.11.2017 / 13:58
1
answer

Alphabetically Sort an ArrayList [duplicate]

I have an ArrayList called Test with the fields: public class Teste { private String dctitle; private String rdfabout; private String dbid; private String depto; private String sigla; private String ciclo; privat...
asked by 10.10.2017 / 21:22
1
answer

2 files properties in Spring Boot [closed]

I'm developing an API with Spring Boot, and I have 2 properties files for the development and production environments, how do I set the properties file for a particular environment?     
asked by 10.10.2017 / 18:47
1
answer

Distinc Criteria Hibernate java

I have the following context: class Entidade1 private Long id; private int commentId; private int userId; class Entidade2 private Long id; private String descricao; - I have the following criteria Criteria criteria = persistence.create...
asked by 29.11.2017 / 14:02
1
answer

Guidance - Manipulation of hours and minutes Java + Postgres

I'm finalizing a worksheet project for an accounting and it's my first project so I still do not experience manipulating date and time in java and database without further ado: I need only and exclusively to make the following account through...
asked by 10.11.2017 / 02:23
1
answer

Conversion String to Double returning null

I have an application in android that I need to capture the entries and store in my Order object, but I need to convert the entries (Strings) to Double numbers, but with the following error: java.lang.NumberFormatException: empty String. Where a...
asked by 09.11.2017 / 15:13
1
answer

How to print step by step

I have the following program that does the following, you insert the rules (V, T, P, S), through 1 file and then you enter the word (GLUD) to see if it is part or n of the language that is in the rule, and there the program returns a Yes or a No...
asked by 30.09.2017 / 01:51
1
answer

How to use a JComboBox from one class to another?

I want to create two screens, one registers the values of the JCombobox and in the other I use the values. I can recover the Combobox but it does not appear any value. Class of registration public class Combo extends JFrame{ private JB...
asked by 29.09.2017 / 19:41
1
answer

Display 1, 2, 3 if you receive odd numbers

I need in textview to display in order 1, 2, 3, 4 etc. But the value he receives from dados.getdia() is always 3, 5, 7, 9, 11 etc. I've tried several things. In this code below it works until you get 5, then when you get 7, it displa...
asked by 30.09.2017 / 02:29