0% found this document useful (0 votes)
3 views1 page

Java FAQ_ Set1

The document contains a set of questions and programming tasks related to Java, divided into two parts. Part 1 includes theoretical questions about Java concepts such as exceptions, collections, and Java 8 features. Part 2 consists of practical programming exercises that require writing Java code to perform various tasks like calculating sums, reversing strings, and manipulating collections.

Uploaded by

apoorvaavuti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
3 views1 page

Java FAQ_ Set1

The document contains a set of questions and programming tasks related to Java, divided into two parts. Part 1 includes theoretical questions about Java concepts such as exceptions, collections, and Java 8 features. Part 2 consists of practical programming exercises that require writing Java code to perform various tasks like calculating sums, reversing strings, and manipulating collections.

Uploaded by

apoorvaavuti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

SET-1

Part1:
1. What is the main method and explain it's signature?
2. What is the difference between JDK, JRE, and JVM?
3. What is the difference between checked and unchecked exceptions?
4. What is the difference between method overloading and method overriding?
5. What is the difference between == and equals() method?
6. What is the difference between ArrayList and LinkedList?
7. What is the difference between this and super keywords ?
8. What are the main features of Java 8 ?
9. What is the difference between Deep copy and Shallow copy ?
10. How does hashmap work internally ?

Part2:
1. Write a java program to print the sum of digits in a given number?
2. Write a java program to print the reverse of a given String?
3. Write a java program to print the largest digit in a given number?
4. Write a java program to print occurrences of a letter in a String ?
5. Write a java program to convert a list to set ?
6. Write a java program to demonstrate throws keyword ?
7. Write a java program to demonstrate yield() method ?
8. Write a java program to print factorial using recursion ?
9. Write a java program to convert the following list into map ?
Given list:
ArrayList of student objects (id,name,percentage,city)
Required map:
HashMap of student objects in which key is id and value is percentage
10. Write a java program to print the sum of salaries of all
employees(id,name,salary,city) who belong to Hyd city using stream api?

You might also like