How many overloaded add() and addAll() methods are available in the List interface? Describe the need and uses. Why is the remove method faster in the linked list than in an array? Why does the java array index start with 0? Contiguous memory locations are usually used for storing actual values in an array but not in ArrayList. Can you call a constructor of a class inside the another constructor? Will the finally block get executed when the return statement is written at the end of try block and catch block as shown below? ![]() Is it mandatory for a catch block to be followed after a try block? How do exceptions affect the program if it doesn't handle them? How does an exception propagate in the code? What do you understand by Object Cloning and how do you achieve it in Java? ![]() What happens if there are multiple main methods inside one class in Java? Can we make the main() thread a daemon thread? Consider the below program, identify the output, and also state the reason for that. What happens if the static modifier is not included in the main method signature in Java? How to not allow serialization of attributes of a class in Java? Which among String or String Buffer should be preferred when there are lot of updates required to be done in the data? What is the ‘IS-A ‘ relationship in OOPs java? Java works as “pass by value” or “pass by reference” phenomenon? Identify the output of the below java program and Justify your answer. What are the differences between constructor and method of a class in Java? What is the difference between the ‘throw’ and ‘throws’ keyword in java? What is the difference between the program and the process? What are the different types of Thread Priorities in Java? And what is the default priority of a thread assigned by JVM? What are the different ways of threads usage? What is the importance of reflection in Java? What are the differences between HashMap and HashTable in Java? What are the differences between JVM, JRE and JDK in Java? Why is the character array preferred over string for storing confidential information? What makes a HashSet different from a TreeSet? In Java, static as well as private method overriding is possible. ![]() Is this program giving a compile-time error? If Yes then state the reason and number of errors it will give. Using relevant properties highlight the differences between interfaces and abstract classes. How would you differentiate between a String, StringBuffer, and a StringBuilder? Which of the below generates a compile-time error? State the reason. What is a singleton class in Java? And How to implement a singleton class? Apart from the security aspect, what are the reasons behind making strings immutable in Java? What are shallow copy and deep copy in java? What part of memory - Stack or Heap - is cleaned in garbage collection process? What is the main objective of garbage collection? Difference between static methods, static variables, and static classes in java. Identify the output of the java program and state the reason. Is it possible that the ‘finally’ block will not be executed? If yes then list the case. Do final, finally and finalize keywords have the same function? Explain the use of final keyword in variable, method and class. A single try block and multiple catch blocks can co-exist in a Java Program. Comment on method overloading and overriding by citing relevant examples. Briefly explain the concept of constructor overloading How is an infinite loop declared in Java? Can you tell the difference between equals() method and equality operator (=) in Java? What are the default values assigned to variables and instances in java? ![]() What do you understand by an instance variable and a local variable? Can java be said to be the complete object-oriented programming language? Difference between Heap and Stack Memory in java. Why is Java not a pure object oriented language? Why is Java a platform independent language?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |