Questions tagged as 'java'

1
answer

Convert Java object to JSON with Gson (generating with backslash)

I'm trying to generate a JSON based on a Java object. JSON is being generated, but some slashes have been improperly included: import java.io.Serializable; import com.google.gson.annotations.SerializedName; public class Documento implemen...
asked by 30.11.2018 / 13:00
1
answer

Change method using Java and SQL

I need to make a change in SQL using Java, but I ended up losing my logic when calling and returning to change. Here's the code outline. Here is Main , where the user informs the CPF that he wants to change: static private void altera...
asked by 23.05.2014 / 13:22
1
answer

How do I get the name of a button in the MouseListener?

How do I get the name of a button in a class that implements the MouseListener: public class Viewer extends javax.swing.JFrame{ public Viewer() { initComponents(); } public void init(){ MouseListener ouvinte = new...
asked by 19.05.2014 / 01:11
1
answer

jBCrypt remains secure?

I would like to know if jBCrypt is out of date because it has not updated for two years link If yes, would you have any replacement for hashs and salts for java?     
asked by 12.07.2014 / 09:07
1
answer

Does the Garbage Collector remove all or only those that have no reference?

In a Java application there are objects that are not being used, there are objects that have and do not have reference. How does the Garbage Collector handle this? Does it remove all or only those that have no reference?     
asked by 20.11.2018 / 11:15
1
answer

How to return a string from the method that SQLite queries?

How to make a method that returns a string with a single result? I'm trying something like this: public String getString(String var) { String selectQuery = "SELECT * FROM "+TABLE_STATUS+" WHERE "+KEY_STATUS_KEY+"='"+var+"'...
asked by 10.07.2014 / 17:26
1
answer

java.lang.OutOfMemoryError: Java heap space

I need help trying to clear these 2 errors: Exception in thread "Thread-4" java.lang.OutOfMemoryError: Java heap space at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88) at java.util.zip.ZipFile$ZipFileInfla...
asked by 10.09.2014 / 13:54
2
answers

Error instantiating an object

When I instantiate the object Vendedor this error appears: java.lang.NullPointerException at Vendedor.<init>(Vendedor.java:9) I would like to know what it means and how I solve it.     
asked by 06.06.2014 / 23:17
1
answer

Resize image in java

I have the following problem. I have an application that takes an image and loads it into a buffer and then I have to resize it. However, using the getScaledInstance() method the image loses a lot of quality. Below the portion that l...
asked by 16.12.2014 / 20:04
1
answer

How to apply a filter of two JDateChooser to a JTable?

I need to simultaneously filter the data to be displayed in a JTable . Querying some old questions I was able to solve part of my problem. I have a DATA field in the table of type String and I have two JDateChooser of the JCalend...
asked by 08.11.2018 / 20:13