Questions tagged as 'java'

1
answer

Collection for use in stock

What is the best implementation of the Collection interface for implementing an inventory class? For example, a stock of grocery products. My scenario is as follows: A stock management system from a supermarket, this collection would make t...
asked by 22.05.2016 / 07:15
1
answer

Why this line of code gives me error?

This line of code gives me error in the phrase SQLiteDatabase.CREATE_IF_NECESSARY and prevents me from doing the database. Why is this happening? SQLiteDatabase BaseDados=SQLiteDatabase.openOrCreateDatabase("BaseDados",SQLiteDatabase....
asked by 15.04.2016 / 20:49
1
answer

Organize items within JTexArea [closed]

How do I get items from a combobox and put it in a jTextArea, one below the other? Follow my code: public class PW_XML extends javax.swing.JFrame { int Grade; int Frequencia; int AttackRN; int DistanciaFrag; int PHAttac...
asked by 13.11.2018 / 00:53
1
answer

Condition IF, ELSE

I have a Java Spring MVC application, with Hibernate and JPA and HTML interface. I have two forms that depend on the class CadernosCadastrados and their attributes. Forms have the following names, cadastrodecadernos, change. In the firs...
asked by 14.11.2018 / 15:57
1
answer

JAX WS RS JPA does not return oneToMany relation in JSON

In my relationship, a Call is related to many Histories. The key of the Call is present in every History. When querying a History for the code, there is a @ManyToOne relation that returns the Call to which the history belongs. When consulting th...
asked by 10.07.2018 / 03:05
1
answer

Read only part of a .txt file in Java

Hello, I'm developing a Discord bot and wanted it to take the Guild ID and Chat I made it write automatically when someone typed -setarbot Guild: 430119147146444807 Channel: 437245715576520716 in a file called guilds.yml and I wanted to do someth...
asked by 16.07.2018 / 18:28
1
answer

How to check if vector fields are null?

I am building a program, which should check initially if the array of type (Class) is null. My class has the get and set method, as well as the with and without default constructors. However, when the program initializes, the values of each cell...
asked by 14.06.2018 / 23:16
1
answer

Matrix Strings

In an exercise in the book "use the java head", it asks to declare 3 arrays of string, but when I put the code in the ide it gives an error of incompatible types string to String [] does anyone know why ??? package exercicios; /** * * @auth...
asked by 20.09.2018 / 01:58
1
answer

Android class to trigger events, Batch Routine?

I need a class that, from time to time, tries to cross database data and depending on the result send a notification to the user or modify / include information from the database. I do not know if this class / structure would be within the scope...
asked by 21.09.2018 / 23:52
1
answer

error java.lang.NullPointerException [duplicate]

I have this error and I can not find the problem.    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at windows.WebPage.getUserList (MainPage.java:53) at   windows.TelePrincipal.Show_Users_In_JTable (MainPage.java:...
asked by 17.09.2018 / 22:15