Do you have an interview coming up for the Java job of your dreams and need to refresh your memory and prepare yourself for this important technical interview? You could be asked any number of questions about your knowledge of Java, so you want to be prepared. Here are some examples of the types of questions you might be expected to answer with expertise.
Step 1
Explain what the disparity is between an interface and an abstract class. For this question, you would elaborate on the fact that an abstract class has method bodies inside it's code which is not tolerated in an interface.
Step 2
Describe your understanding of the term synchronization. Here, you would explain that it is a technical directive that admits shared resources by various threads. The result is that only one thread can be accessed to one resource at any one time.
Step 3
Assess how you can force or coerce what is known as garbage collection. Here, you can correctly tell your interviewer that you can't do that. However, go on to explain that you could call up garbage collection by going to System.gc(), but it doesn't guarantee that it'll be started right away.
Step 4
Interpret you would use Java packages. Here, you would explain to your interviewer that Java packages are used to organize files for a project that has various modules. Further, you could elaborate that Java packages also help to clear up naming conflicts when various packages utilize the same class names.
Step 5
Decipher what OOPS means. Proudly tell the interviewer that OOPS stands for Object-Oriented Programming. Your interviewer may proceed to ask you to describe the principles of OOPS. Describe the three main ones--Polymorphism, Inheritance, and Encapsulation.
Step 6
Determine what the inheritance principle is and what the polymorphism principle is. This would be a two-part question. Phrase your wording carefully. First, tell the interviewer that the inheritance principle is the method by which one object takes over the properties of another. Continue to explain that polymorphism permits one entity to be utilized as a universal classification for a variety of actions.
Step 7
Identify what the differences are between a stack and a queue. Here, tell the interviewer that queues utilize the first-in-first-out rule (FIFO), and stacks work under the last-in-first-out rule (LIFO).
No comments:
Post a Comment