Questions tagged as 'java'

1
answer

Does Java have a default constructor?

In a book called "Java in depth" it was specified that when creating a class in Java it was a default constructor. But, in a question from the Android App SoloLearn it appeared that the default constructors in Java do not exist. Which of the 2 i...
asked by 16.04.2018 / 18:03
3
answers

If, else if conditions in java

I'm new to this Java topic and I run into a problem, I have a form where gender reports PDF in which I have several options to generate them, full report of the table, detailed report by date, report with just a search using SQL LIKE statements...
asked by 26.11.2018 / 14:02
3
answers

Arraylist in java

Is it possible that when you create an ArrayList it already has a value inside it? example: //creo el arraylist para almacenar luchadores que son parte de otra clase private ArrayList<Luchador> cantLuchadores= new ArrayList<Luchado...
asked by 21.04.2018 / 21:48
1
answer

I need to treat an enumerated as if it were an array in a jsp with jstl

For now I am loading the elements of the list manually, but I would like to know if you can go through any of the components provided by JSTL ( c:forEach for example), because in the enum I have 3 options, but imagine if there are 500 opt...
asked by 27.03.2018 / 20:24
1
answer

How can I remove the hidden attribute to a java file?

package com.resolvethis.nio; import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.Paths; public class MakeFileHidden { public static void main(String[] ar...
asked by 08.05.2018 / 23:44
1
answer

Error deploy java jersey with Tomcat 8.5

I am using IDE Myeclipse CI 10 , the code works perfectly when publishing and consuming the service from my IDE, but when I deploy the service I tried to consume it from my server Tomcat 8.5 shows me an error. Java code package logic; imp...
asked by 07.05.2018 / 16:23
3
answers

Create invoice number in java

I want to create a method that generates an invoice number. I do not increase it in the DB because it is not recommended and I have decided to create a char varying field where I store or add 1 to the query in postgres. public Cliente numOr...
asked by 21.03.2018 / 16:15
1
answer

BDOO error with Persistence EclipseLink-4002

I'm trying to increase and I now get this error: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException:...
asked by 22.03.2018 / 18:45
1
answer

Show elements of ArrayList in another window

I'm doing a small application that makes a draw among several participants and shows the result in a JDialog. I have two errors in the code that do not allow it to execute well: private void jButton2MouseClicked(java.awt.event.MouseEvent e...
asked by 08.01.2018 / 19:11
1
answer

Problems with Integer.parseInt ()

I am making an application of the game of roulette, where to bet the player must press buttons. I can not get the number of bets placed on a JLabel calculated. What the JLabel must return is contador + (JLabelname.getText())-->...
asked by 14.12.2017 / 05:58