MCQ Java Interfaces

Q) Which keyword is used to declare an interface in java? class interface implements abstract     Q) A java interface can contain ———— public static Final Variables only public Abstract methods Abstract methods(unimplemented) and implemented methods both public static Final Variables and abstract methods both   Q) Which is the correct way to inherit…

Read the full article

Loose coupling and tight coupling in java – Comparison Example

Notes on loose coupling and tight coupling in java with example. Example of tight coupling and loose coupling in java will be demonstrated with same program and outputs for better understanding between their difference. Tight coupling will be implemented using concrete implementation of classes and loose coupling will be achieved by using class and interface. loose…

Read the full article

10 HR interview questions for freshers – Learn Effective Tips

HR interview questions for freshers that he should prepare before attending job interviews to make the answer impressive. Hint and guideline has been provided to answer them better. These are the questions that are asked in HR interviews, but, they are also asked by technical interview panels or manager of the company. These questions are…

Read the full article

Why to use Abstract keyword in java language?

Abstract keyword is used to create an abstract class and abstract methods in java programs. Abstract class: Abstract class in java is used as a base class in inheritance relationship. Abstract class have both non-abstract (implemented methods) and abstract (un-implemented methods) that must be overridden by sub classes. Note that If we want to have…

Read the full article

What are methods of object class in java? – with description

Methods of Object class in java with brief descriptions – The java.lang.Object class is the super class of all classes  whether the class is predefined or user defined class. Object class is by default inherited whether we extend explicitly or not. Methods of object class in java : protected native Object clone() throws CloneNotSupportedException public boolean equals(Object…

Read the full article

What is null pointer exception in java ? How to prevent?

Answer includes, null pointer exception in java with example when it can occur in programs and how we can prevent it. Java interview Question: What is NullPointerException? Tell me some examples when this exception can occur in java programs. How would you prevent null pointer exceptions? Answer: null pointer exception is a run time exception…

Read the full article