How to retrieve data from database in java using arraylist?
Answer / 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 |
What is meant by 'Class access modifiers'?
What is deadlock and how to avoid this?
What is empty string literal in java?
Why strings in java are called as immutable?
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
What is functional interface in java?
Can you inherit from an abstract class java?
What is the benefit of using enum to declare a constant?
Can an arraylist be empty?
How many bytes is string in java?
What are different types of states exist for a thread?
Question 6 [9] 6.1 In what situations (in general) would you use a TreeMap? (3) 6.2 In what situations (in general) would you use a HashSet to store a collection of values?