Questions tagged as 'java'

2
answers

Help in java code (Beginner)

I wrote this code in java, to study. (I'm learning), but when I try to create a new object of error. Class Company: class Empresa { String nome = ""; String cnpj = ""; int numeroDeFuncionario = 1; Funcionario[] funcionario = new Fun...
asked by 19.09.2017 / 19:44
2
answers

java.lang.nullPointerException Error

I'm doing a Java exercise and it requires me to create a note of the product sold, containing random numbers plus the first three letters of the customer as product code, but when I try to generate the winning note this error . public Compr...
asked by 12.04.2014 / 02:19
1
answer

How do I clean a JTable?

I'm using JPA to populate my table which is located at Jframe . Through JPA, I make a selection in my bank to find all names that have part of the name I wrote, for example, if the entry is "m", all people with a name beginning with "m"...
asked by 20.06.2017 / 19:48
1
answer

Check null, how to proceed? [closed]

How do I put it to check if the cell is empty in this method? public void VerificarResultdo() { int linha = CadresultadoTabela.getSelectedRow(); int coluna = CadresultadoTabela.getSelectedColumn(); String tipo = Cad...
asked by 07.08.2017 / 15:57
1
answer

How to only get links in a source code?

Since last night I try to make an algorithm to do search line by line and only return links, but it's complicated, or I'm stupid or the methods of the String class, which I know, does not help much .     
asked by 25.03.2016 / 15:24
1
answer

Extract existing value between two tags with regular expression

How to check from a regular expression if there is a certain value between two strings, for example, the tags <code> and </code> ? I want, for example, to know if there is a value between "03" between the two tags. Ho...
asked by 17.03.2016 / 19:53
2
answers

Problem with JAVAC version for dynamic compilation

I'm trying to compile a HelloWorld class for testing, and it's giving an error that I do not know how to solve. Does anyone know a solution? It looks like it's some version-related issues. I'm trying to compile like this: String arquivo2 =...
asked by 21.03.2016 / 16:16
2
answers

What annotation is used in the ORMLite mapping for Enum as Foreign?

I have the Customer class and the Enum PetsEstimation where a customer can have 1 or more pets. It would look like this: @DatabaseTable(tableName = "cliente") public class Cliente{ @DatabaseField(generateId = true) private Long id; @Database...
asked by 17.04.2014 / 16:13
1
answer

How do I access text size (TexView) and text box (TextView) compression via code?

I want to create a AutoScale TextView , I needed to access the size of the text and length via code. I've been searching the Internet for quite a while, but I'd like to learn and make my own code.     
asked by 12.01.2016 / 20:40
1
answer

Create POJO for JSON

I have a problem creating a POJO of this Json (end of question). Classes > > > > Main public class teste { public static void main(String[] args) { ((Runnable) () -> { System.out.println("PreExecute");...
asked by 06.01.2017 / 07:10