Interview Questions.

Top 100+ Ericsson Java Interview Questions And Answers


Top 100+ Ericsson Java Interview Questions And Answers

Question 1. What Is The Main Difference Between Java Platform And Other Platforms?

Answer :

The Java platform differs from maximum different structures inside the sense that it’s a software program-based totally platform that runs on pinnacle of other hardware-based platforms.It has two components:

Runtime Environment

API(Application Programming Interface)

Question 2. When Abstract Methods Are Used?

Answer :

If you want a category to include a selected approach however you need the actual implementation of that approach to be determined via toddler training, you may declare the approach in the determine elegance as abstract.

Adv Java Interview Questions
Question 3. What Are Wrapper Classes?

Answer :

These are instructions that allow primitive sorts to be accessed as gadgets.

Example: Integer, Character, Double, Boolean etc.

Question 4. What Do You Mean By Platform Independence?

Answer :

Platform independence way that we can write and assemble the java code in a single platform (eg Windows) and might execute the class in any other supported platform eg (Linux,Solaris,and so on).

Adv Java Tutorial
Question five. What Is A Pointer And Does Java Support Pointers?

Answer :

Pointer is a reference deal with to a memory place. Improper handling of hints leads to memory leaks and reliability troubles consequently Java doesn’t assist the use of tips.

J2EE Interview Questions
Question 6. What Is The Difference Between Creating String As New() And Literal?

Answer :

When we create string with new() Operator, it’s created in heap and no longer added into string pool whilst String created using literal are created in String pool itself which exists in PermGen vicinity of heap.

String s = new String(“Test”);

does now not  put the item in String pool , we want to name String.Intern() technique that is used to place  them into String pool explicitly. Its handiest whilst you create String object as String literal e.G. String s = “Test” Java mechanically put that into String pool. (  Ericsson JAVA interview questions )

Question 7. What Is The Use Of The Finally Block? Is Finally Block In Java Guaranteed To Be Called? When Finally Block Is Not Called?

Answer :

Finally is the block of code that executes always. The code in ultimately block will execute despite the fact that an exception is occurred. Finally block is NOT called in following situations

If the JVM exits whilst the try or capture code is being achieved, then the sooner or later block won't execute. This may show up because of System.Exit() name.

If the thread executing the strive or trap code is interrupted or killed, the in the end block may not execute even though the application as a whole keeps.

If a exception is thrown in subsequently block and no longer treated then closing code in in the end block won't be achieved.

J2EE Tutorial Core Java Interview Questions
Question eight. What’s The Difference Between The Methods Sleep() And Wait()?

Answer :

The code sleep(2000); puts thread apart for precisely  seconds. The code wait(2000), causes a wait of up to 2 2nd. A thread ought to forestall ready earlier if it receives the notify() or notifyAll() call. The technique wait() is defined in the magnificence Object and the method sleep() is defined within the class Thread.

Question 9. What Is The Difference Between An Interface And An Abstract Class ?

Answer :

An summary magnificence will have instance methods that enforce a default behavior. An Interface can most effective declare constants and example methods, however can not enforce default conduct and all techniques are implicitly summary. An interface has all public contributors and no implementation.

JSP Interview Questions
Question 10. Difference Between Final, Finally And Finalize ?

Answer :

Final is used to apply regulations on elegance, technique and variable. Final class can’t be inherited, final method can’t be overridden and very last variable cost can’t be changed.

Finally is used to area critical code, it will likely be finished whether or not exception is handled or not.

Finalize is used to perform easy up processing just earlier than item is garbage accumulated.

Core Java Tutorial