Top 9 Ericsson Java Interview Questions
Q1. What Is A Pointer And Does Java Support Pointers?
Pointer is a reference cope with to a memory area. Improper handling of hints leads to memory leaks and reliability problems therefore Java doesn’t support using recommendations.
Q2. Difference Between Final, Finally And Finalize ?
Final is used to apply restrictions on magnificence, technique and variable. Final magnificence can’t be inherited, very last approach can’t be overridden and very last variable fee can’t be changed.
Finally is used to vicinity important code, it is going to be completed whether exception is handled or now not.
Finalize is used to carry out easy up processing just before object is rubbish accrued.
Q3. When Abstract Methods Are Used?
If you need a class to comprise a specific method however you need the real implementation of that approach to be determined by means of child lessons, you can declare the approach within the determine magnificence as summary.
Q4. What Are Wrapper Classes?
These are instructions that permit primitive kinds to be accessed as objects.
Example: Integer, Character, Double, Boolean and so forth.
Q5. What Is The Main Difference Between Java Platform And Other Platforms?
The Java platform differs from maximum different platforms in the experience that it’s a software program-based totally platform that runs on top of different hardware-based platforms.It has additives:
Runtime Environment
API(Application Programming Interface)
Q6. What Is The Difference Between Creating String As New() And Literal?
When we create string with new() Operator, it’s created in heap and not delivered into string pool while String created the usage of literal are created in String pool itself which exists in PermGen vicinity of heap.
String s = new String(“Test”);
does not put the item in String pool , we want to name String.Intern() approach that's used to position them into String pool explicitly. Its only whilst you create String item as String literal e.G. String s = “Test” Java automatically placed that into String pool. ( Ericsson JAVA interview questions )
Q7. What Is The Use Of The Finally Block? Is Finally Block In Java Guaranteed To Be Called? When Finally Block Is Not Called?
Finally is the block of code that executes usually. The code in sooner or later block will execute despite the fact that an exception is occurred. Finally block is NOT known as in following situations
If the JVM exits while the attempt or capture code is being executed, then the in the end block might not execute. This might also appear due to System.Exit() call.
If the thread executing the strive or catch code is interrupted or killed, the ultimately block won't execute despite the fact that the application as a whole maintains.
If a exception is thrown in in the end block and now not treated then last code in subsequently block might not be performed.
Q8. What Do You Mean By Platform Independence?
Platform independence me that we will write and bring together the java code in a single platform (eg Windows) and may execute the magnificence in any other supported platform eg (Linux,Solaris,and so forth).
Q9. What Is The Difference Between An Interface And An Abstract Class ?
An abstract magnificence can have example techniques that enforce a default conduct. An Interface can handiest claim constants and example techniques, but can not put into effect default conduct and all techniques are implicitly summary. An interface has all public individuals and no implementation.

