(1 Marks Each)
1. What is the default initial capacity of HashMap?
2. Which interface must be implemented to use a thread pool in java?
3. What exception is thrown for invalid array indices?
4. What annotation is used for primary key generation strategy?
5. What is the syntax of ‘try-with-resources’?
6. What is the superclass of all exceptions?
7. What will be the output
Double x=3.14;
int y = (int)Math.ceil(x);
System.out.println(y);
8. Which spring annotations is used for method-level security?
9. What does @JoinColumn annotation defines?
10. What method is used to add an item to an array(Javascript)?
(2.5 marks each)
11. Find average, max, min number from student table, column
name(Student_Name, Marks).
12. Write a query that retrieves products with but different prices.
product_name price
Widget 10
Widget 15
Gadget 10
Gadget 10
Thingamajig 20
(5 marks Each)
13.Write a program to find the first non-repeating character in a string in java.
14. Write a Stream Api program for Square, Filter(remove greater than 50) and
Average of Numbers.
[2,5,8,6,4,2,5,3,8,5]