Java Related Interview Questions
Questions Answers Views Company eMail

How can an exception be thrown manually by a programmer?

515

How we can execute any code even before main method?

556

Can we call a non-static method from inside a static method?

566

Why strings in java are called as immutable?

596

What is the difference between an inner class and a sub-class?

510

Is it compulsory for a try block to be followed by a catch block in java for exception handling?

597

How can we use primitive data types as objects?

562

Can variables be used in java without initialization?

554

What is an infinite loop?

551

What is an infinite loop? How infinite loop is declared?

575

Can we use a default constructor of a class even if an explicit constructor is defined?

657

What's the purpose of static methods and static variables?

600

What is the difference between comparison done by equals method and == operator?

576

When the constructor of a class is invoked?

598

What is ternary operator? Give an example.

603


Un-Answered Questions { Java Related }

Why use the bootstrap port number?

437


Can we convert stringbuilder to string in java?

562


What is a simple definition of a map?

146


Is it necessary that each try block must be followed by a catch block?

564


What is the difference between instanceof and isinstance?

570






What is os tuning?

592


Why did my jdbc code throw a rollback sqlexception?

512


How can you inject a java collection in spring?

147


Why hibernate is used in java?

151


List some life cycle methods of a servlet.

592


What is requestbody?

159


What is an example of a many to many relationship?

156


In java, what is the difference between method overloading and method overriding?

586


What are advantages and disadvantages of OOPs?

630


What is collection mapping?

147