Define following: i. Encapsulation ii. Synchronization iii. variable shadowing iv. Daemon Thread v. Garbage collection vi. getInstance() method vii. File class
[7 marks]Why Java is a platform independent language? How Java achieve this?
[7 marks]Explain conditional and bitwise operator with suitable example.
[7 marks]Discuss FileReader and FileWriter classes from java.io package with suitable example.
[7 marks]i. Explain different access specifier used in java ii. Explain the difference between the variable of primitive data types and reference data type with java code.
[4 marks]Write a java program to create a class “Matrix” that would contain integer values having varied Numbers of columns for each row. Print row-wise sum of the integer values for each row.
[7 marks]Write a short note on super keyword.
[7 marks]Define following term: i. Abstract class ii. Overloading and overriding
[3 marks]Justify a statement “String objects are immutable”. What is String Buffer? Explain difference between String Buffer and String Builder with example.
[7 marks]How can we create checked custom exception? Explain it with the help of following example. Write a small application in Java to develop Banking Application in which user deposits the amount Rs. 10000.00 and then start withdrawing of Rs. 4000.00, Rs. 3000.00 and it throws exception "Not Sufficient Fund" when user withdraws Rs. 5000.00 thereafter.
[7 marks]What is deadlock? Write the steps to avoid deadlock. Using an example explain how can threads communicate with each other.
[7 marks]Page 1 of
[2 marks]Create a class “Student” that would contain enrollment No, name, and gender and marks as instance variables and count as static variable which stores the count of the objects; constructors and display (). Implement constructors to initialize instance variables. Create objects of class “Student” and displays all values of objects.
[7 marks]Define final variable, final method and final class. Explain with suitable example.
[7 marks]What is package? Explain package creation and implementation of it in Java with suitable example.
[7 marks]Explain following term with java code: i. Comparator and Comparable ii. throws and throw statement
[4 marks]Write a Java application which takes several command line arguments, which are supposed to be names of students and prints output as given below: (Suppose we enter 3 names then output should be as follows). Number of arguments = First Student Name is = Arjun Second Student Name is = Hitesh Third Student Name is = Suresh
[3 marks]Explain Inheritance and types of inheritance in brief. Page 2 of
[2 marks]