adspace


How to retrieve data from database in java using arraylist?

Answer Posted / Saurabh Shukla

In Java, you don't directly use ArrayList to retrieve data from a database. Instead, you typically use ResultSet or PreparedStatement objects provided by JDBC (Java Database Connectivity) API. Once the data is retrieved and stored in these objects, you can convert it into an ArrayList if needed.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between static and non-static methods in java.

1131


What is java string pool?

1088


Write a program to find the whether a number is an Armstrong number or not?

1106


What are the differences between heap and stack memory in java?

1150


Write a program to print count of empty strings in java 8?

1091


What is a constructor overloading in java?

1130


How to sort array in descending order in java?

999


What do you mean by an interface in java?

1105


How to create a base64 decoder in java8?

1144


Realized?

2268


What is parsing in java?

1046


Explain public static void main(string args[]) in java.

1082


What is the difference between break and continue statements?

1131


What is an object in java and how is it created?

1146


What is the difference between equals() and == in java?

1046