Trending questions in Java

0 votes
1 answer

How to refresh a JTable model after insert delete or update the data

In my opinion, you can notify your ...READ MORE

Oct 11, 2018 in Java by code.reaper12
• 3,500 points
26,055 views
+1 vote
1 answer

How to get Alias name of AWS Lambda function from java code?

Hey @Abhishek, you could probably use the ...READ MORE

Apr 1, 2020 in Java by Sirajul
• 59,190 points
2,721 views
0 votes
1 answer

How to call setUndecorated() after a frame is made visible?

Hello kartik, You can Try: dispose(); setUndecorated(true); setVisible(true); Check it Out. Hope ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,800 points
1,871 views
0 votes
1 answer

How to open warning/information/error dialog in swing?

Hello, You can try out : import javax.swing.JFrame; import javax.swing.JOptionPane; public ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,800 points
1,669 views
0 votes
1 answer

How to implement draggable tab using Java Swing?

Hello kartik, setAcceptor(TabAcceptor a_acceptor) should let the consumer code ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,800 points
1,619 views
0 votes
2 answers

What is immutable string in java?

To answer your question, the String is ...READ MORE

Feb 9, 2022 in Java by Soham
• 9,730 points
1,269 views
0 votes
1 answer

How to set JFrame to appear centered, regardless of monitor resolution?

Hello kartik, You can  always did it in ...READ MORE

May 7, 2020 in Java by Niroj
• 82,800 points
837 views
0 votes
1 answer

How to add tabs to JTabbedPane using WindowBuilder?

Hii, You can just find out by given ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,800 points
1,486 views
0 votes
1 answer

What Kind of Files IOC Container can Read other than XML directly or Indirectly?

Hi, @Ferry, The configuration metadata is nothing but bean ...READ MORE

Apr 23, 2020 in Java by Gitika
• 65,730 points
1,368 views
0 votes
1 answer

Types of IOC containers in Spring Framework

There are basically two types of IOC ...READ MORE

Aug 28, 2018 in Java by misc.edu04
• 1,450 points
27,488 views
0 votes
1 answer

What is the reason for no ConcurrentHashSet against ConcurrentHashMap?

Hello, There's no built in type for ConcurrentHashSet because you ...READ MORE

Apr 8, 2020 in Java by Niroj
• 82,800 points
1,872 views
0 votes
2 answers

can i run two tomcat servers on the same linux VM machine?

Hello @Ganesh, To run and configure multiple instances ...READ MORE

Jul 30, 2020 in Java by Niroj
• 82,800 points
6,153 views
0 votes
1 answer

How can we activate JMX on my JVM for access with jconsole?

Hello @kartik, Run your java application with the ...READ MORE

Apr 9, 2020 in Java by Niroj
• 82,800 points
1,499 views
0 votes
0 answers

How to manage two JRadioButtons in java so that only one of them can be selected at a time?

How to manage two JRadioButtons in java ...READ MORE

Apr 21, 2020 in Java by kartik
• 37,520 points
980 views
0 votes
2 answers

How do i create generic array in Java

as first tip you cannot assign value ...READ MORE

Feb 13, 2020 in Java by sama
17,639 views
0 votes
1 answer

How to run a Java program from the command line on Windows?

Hello @kartik, In case your Java class is ...READ MORE

Apr 9, 2020 in Java by Niroj
• 82,800 points
1,354 views
0 votes
1 answer

How could I implement autocompletion using Swing?

Hello, You can try out this: import java.awt.*; import java.awt.event.*; import ...READ MORE

Apr 21, 2020 in Java by Niroj
• 82,800 points
822 views
0 votes
1 answer

Error:“java.lang.OutOfMemoryError: Java heap space” ?

Hii, Possible causes: Simple configuration issue, where the specified ...READ MORE

Apr 8, 2020 in Java by Niroj
• 82,800 points
1,348 views
0 votes
1 answer

java path not found in window 7

Hey, You can follow these few steps: From the ...READ MORE

Apr 3, 2020 in Java by Gitika
• 65,730 points
1,524 views
0 votes
1 answer

How does Java convert integer value into byte?

When an integer value is converted into ...READ MORE

Feb 28, 2019 in Java by Avantika
• 1,520 points

edited Feb 28, 2019 by Omkar 18,704 views
0 votes
1 answer

Error: Unable to run mksdcard SDK tool in java?

Hello, If you use  Ubuntu, you can try: sudo apt-get ...READ MORE

Apr 9, 2020 in Java by Niroj
• 82,800 points
1,132 views
0 votes
1 answer

How to pass an object from one activity to another on Android?

Hello @kartik, Implement your class with Serializable. Let's ...READ MORE

Apr 8, 2020 in Java by Niroj
• 82,800 points
1,019 views
0 votes
0 answers

If statement not working in AWS Lamnda - S3Event code

Hi, I am using below  lambda function with ...READ MORE

Apr 4, 2020 in Java by Abhishek
• 280 points
1,190 views
0 votes
0 answers

HOw can i do this?

The department of History has just bought ...READ MORE

Apr 16, 2020 in Java by MIH
• 150 points
663 views
0 votes
1 answer

Escaping strings in JSON

You can find a JSON library in your ...READ MORE

Oct 4, 2018 in Java by geek.erkami
• 2,680 points
24,802 views
0 votes
0 answers

Where exactly in the variable file path will I paste the javac file path?

I wrongly placed the javac file in ...READ MORE

Apr 2, 2020 in Java by anonymous
• 120 points
1,116 views
0 votes
1 answer

how to do global variable declaration in java

Hello,​ Global varriable which is defined after the ...READ MORE

Apr 3, 2020 in Java by Niroj
• 82,800 points
1,015 views
0 votes
2 answers

How to convert List<Integer> to int[] in Java?

In addition to Commons Lang, you can ...READ MORE

Aug 20, 2019 in Java by Sirajul
• 59,190 points
16,966 views
+1 vote
1 answer

How to generate a class at runtime in Java?

Yes: you can do it with Burningwave ...READ MORE

Mar 16, 2020 in Java by Roberto
• 460 points

edited Apr 14, 2020 by Roberto 1,467 views
+1 vote
2 answers

Calculating date/time difference in Java

We can also use java.util.concurrent.TimeUnit class. long diff = d2.getTime() ...READ MORE

Aug 28, 2018 in Java by Sushmita
• 6,920 points
27,346 views
+2 votes
2 answers

How to connect to Oracle using Service Name instead of SID?

HII.. I hope this information may help you- Thin-style ...READ MORE

Sep 29, 2020 in Java by SRI
10,565 views
0 votes
1 answer

What is Modeshape. How can i use this?

ModeShape is an open-source implementation of the JSR-283 specification and ...READ MORE

Mar 30, 2020 in Java by Gitika
• 65,730 points
1,227 views
0 votes
2 answers

how can we Create instance for generic type in java

private static class SomeContainer<E> { ...READ MORE

Aug 27, 2018 in Java by Sushmita
• 6,920 points
27,428 views
0 votes
1 answer

How to solve this error: No Persistence provider for EntityManager named

After <persistence-unit name="agisdb">, define the persi ...READ MORE

Jan 8, 2019 in Java by Daisy
• 8,140 points
19,781 views
0 votes
3 answers

How autowiring works in Spring?

First, and most important - all Spring ...READ MORE

Jan 11, 2019 in Java by developer_1
• 3,350 points
19,258 views
0 votes
0 answers

How to handle simultaneous requests using springboot?

A gateway and load balancer built using ...READ MORE

Feb 9, 2020 in Java by anonymous
• 19,550 points
2,002 views
0 votes
1 answer

Importing classes in JSP

Use Page Directive to import a Class ...READ MORE

May 25, 2018 in Java by Rishabh
• 3,620 points
28,857 views
+1 vote
0 answers

I am getting below error "The method readerFor(Class<Map>) is undefined for the type CsvMapper"

I Have requirement to convert csv to ...READ MORE

Dec 29, 2019 in Java by anonymous
• 160 points
3,596 views
+2 votes
3 answers

Listing all the subclasses of a specific class in Java

Try with BurningWave core library. Here an ...READ MORE

Dec 29, 2019 in Java by anonymous
• 460 points

edited Jan 9, 2020 by anonymous 15,627 views
0 votes
1 answer

How can I get the current date and time in UTC or GMT in Java?

This definitely returns UTC time: as String ...READ MORE

Jun 7, 2018 in Java by Rishabh
• 3,620 points
28,043 views
0 votes
1 answer

Why is my Spring @Autowired field null?

If you are not coding a web ...READ MORE

Dec 27, 2018 in Java by Daisy
• 8,140 points

edited Mar 4, 2022 by Sarfaraz 19,234 views
0 votes
1 answer

Java execute vs executeQuery vs executeUpdate

I think the major differences between execute, executeQuery, ...READ MORE

Jul 31, 2018 in Java by geek.erkami
• 2,680 points
25,376 views
0 votes
2 answers

How to ignore exception in Java?

There is no way to basically ignore a ...READ MORE

Aug 16, 2019 in Java by Sirajul
• 59,190 points
13,564 views
+1 vote
0 answers

getting below error when trying to conver csv file to json :The method readerFor(Class<Map>) is undefined for the type CsvMapper [closed]

PFB source code: import java.io.File; import java.lang.*; import java.util.Arrays; import java.util.List; import ...READ MORE

Dec 29, 2019 in Java by anonymous
• 160 points

closed Jan 14, 2020 by Kalgi 2,378 views
+1 vote
1 answer

Program for nth prime number without using scanner

Hi @Sneha, you could use something like ...READ MORE

Jan 13, 2020 in Java by Kalgi
• 52,340 points
1,636 views
+2 votes
1 answer

please someone tell the code to launch an instance in digital ocean using java

In order to create a digital ocean ...READ MORE

Jan 14, 2020 in Java by Sirajul
• 59,190 points
1,462 views
0 votes
2 answers

In Java, what is the best way to determine the size of an object?

I happened to find a java class "jdk.nashorn.internal.ir.debug.ObjectSizeCalculator", ...READ MORE

Aug 19, 2019 in Java by Sirajul
• 59,190 points
13,640 views