Questions tagged as 'java'

1
answer

BigDecimal - set to null by form when input is empty

I have a form (jsf / primefaces) where a value of type BigDecimal , can be submitted without value. In this case, the value of it should be null . However, when set, it will be 0 . There is an argument that is passed to...
asked by 29.10.2016 / 22:46
2
answers

How to remove the decimal point

I have this method public void calcularVotosTotal(){ System.out.println("votos valiudos " + this.getNumeroEleitores() * 0.8 + "% " + " Votos Brancos " + this.getNumeroEleitores() * 0.06 + "% " + " votos nulos "...
asked by 29.10.2016 / 20:25
2
answers

I do not know how to call a certain list item that enters my "for" in other functions

I'm trying to make a program that picks up a list of members that contains the name, email, and renewal day (type of day pay monthly), and when it's the day, send an email to him. But I have trouble getting the name and email of that particul...
asked by 12.12.2016 / 05:02
1
answer

Java java.lang.NullPointerException in the constructor of a JPanel

I'm trying to compile a game from memory in java, but it gives the following error: Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:217) at memorygame.Game.initSquares(Game.java:...
asked by 09.12.2016 / 02:12
1
answer

Checking for special characters

I need to do a check on a string in java that allows the user to enter normal accents, but do not enter special characters such as @#!$! etc. I did something similar to verify numeric and blank registration using 'matches'. Is there...
asked by 04.11.2016 / 12:58
1
answer

Infinite Loop in java

This code of my code is intended to rename a mass of files to set the following pattern: All compound names, the words should start in uppercase. First I give a substring for names that only have one word and then I make a while for compo...
asked by 05.11.2016 / 12:55
1
answer

Problem parsing regular expressions of a jTextArea

I'm trying to parse text typed in a jTextArea, in the form of an algorithm in English. Initially I must recognize the main method, which is characterized by "beginning" and "end." The way I'm doing (code below), my logic only works if everything...
asked by 31.10.2016 / 19:34
1
answer

How to upload BD backup to the server using Okhttp?

How to upload the .db file (SQLite backup) from the android device to a server using the Okhttp, java, and PHP library?     
asked by 25.12.2016 / 22:01
1
answer

Dynamic query using JPQL

I need to implement a dynamic query logic, in the DB using JPQL, and I have 4 filters:    1 - PROJECT COORDINATOR   2 - SERVICE PROVIDER   3 - DATE START OF THE PROJECT   4 - FINAL DATE OF THE PROJECT Any of the fields can be combined...
asked by 23.12.2016 / 15:01
1
answer

Date and Time search help

Good Morning I'm doing a date search on android and am having trouble checking the time.It says it gave the syntax error about the time, and another one when I get the date the time is showing less than 3 hours. Can someone help me? follow th...
asked by 06.12.2016 / 12:19