Questions tagged as 'java'

2
answers

Error receiving data from Firebase

I'm having problems with my TCC, I'm not able to receive data from Firebase and display them in a listview, it has an error, I'm using ValueEventListener to try to get the data ... listview is in fragment . Anyone know...
asked by 06.06.2017 / 15:59
1
answer

Problem with using lists in Java

I have a file loaded with 300,000 thousand prices. I need to put the prices in ascending order in a list. If I put it in standard mode, analyzing linearly where to enter each price, my algorithm gets very slow. Does anyone have an idea of a quic...
asked by 05.06.2017 / 22:06
1
answer

Table names in Hibernate are created with lowercase letters

I'm trying to transform the following Entity into a table in Postgre using Hibernate @Entity @Table(name="Usuarios") public class Usuario implements Serializable { ... } The problem is that when the table is created, its name is created wit...
asked by 06.06.2017 / 15:07
1
answer

Doubt about filling arrays and functions within arrays

   insira o código aquiArrayList<Player> players = new ArrayList<Player>(); for(contador=0;contador<x;contador++){ Player p1 = new Player(); p1.setId(contador); p1.setSaldo(valorinteger = Integer.parseInt(parts[2]));...
asked by 07.06.2017 / 05:29
0
answers

Java swing - exercise [closed]

I'm doubtful about Container, I'd like to know if the way I've done is correct. public class Exercicio2 { public static void main(String[] args) { JLabel lblTitulo = new JLabel(); JLabel lblLogin = new JLabel(); JLabel lblPasswor...
asked by 06.06.2017 / 17:05
1
answer

File Reading in Java [closed]

I'm trying to read a file ( arquivo.txt ) that is in the same folder as my class, but I run the code an error appears that did not find the file. Could someone check what's wrong? Thanks in advance. My arquivo.txt : Industria;2;...
asked by 06.06.2017 / 17:05
1
answer

Compare dates and validate only the same year

In my component p:calendar there are two date ranges dtInicial and dtFinal in the managed bean I need to compare only the years and validate. If it is the same year, show the message "ok". Otherwise, "different years." pr...
asked by 27.06.2017 / 19:27
1
answer

JPQL query help

I am trying to return a group query along with the product entity returning all the data from the product table and the sum of the quantity. I get an error that is as follows: Exception in thread "main" java.lang.IllegalArgumentException: Type...
asked by 27.06.2017 / 18:46
1
answer

(JAVA) Help in order of sorting (Selection Sort and Insertion)

   / * EXERCISE: Write a method that puts an unordered sequence of n integers in ascending order. Home   (a) Using sorting by selection   (b) Using insertion ordering * / I tried to solve the exercise, but I'm getting that result: Or...
asked by 03.07.2017 / 05:18
1
answer

Java with MySQL (JDBC) - Type YEAR

I am having a question on how to write a YEAR type in MYSQL database using a Java application from a TextField, I have already tried to use Date type, but I can not get just the year to write to the YEAR field in the YEAR field. I tried with Sim...
asked by 01.07.2017 / 23:38