A Java developer job is responsible for many duties throughout the development lifecycle of applications, starting from conceptual and design part right through to testing phase. Here are some other responsibilities they may have: Design, Develop, test, implement and maintain application software. Getting certified in Java programming language will create more opportunities in the competitive world. Strong Communication Skills - Should be interact with client stakeholders to probe a technical problem. One can check the availability of the job across cities including Bangalore, Pune, Chennai and Hyderabad. Wisdomjobs has interview questions which are exclusively designed for job seekers to assist them in clearing job interviews. Java Developer interview questions and answers are useful to attend job interviews and get shortlisted for job position.
Question 1. Described Heavy Weight Components Mean In Java Programming?
Answer :
Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button. In this relationship, the Motif button is called the peer to the java.awt.Button. If you create two Buttons, two peers and hence two Motif Buttons are also created. The Java platform communicates with the Motif Buttons using the Java Native Interface.
For each and every component added to the application, there is an additional overhead tied to the local windowing system, which is why these components are called heavyweight.
Answer :
If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped.
Operator & has no chance to skip both sides evaluation and && operator does.
Question 3. Does The Garbage Collection Guarantee That A Program Will Not Run Out Of Memory?
Answer :
No, it doesn't. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.
Question 4. Described The Elements Of A Gridbaglayout Organized In Java Programming?
Answer :
The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.
Question 5. What Advantage Do Java's Layout Managers Provide Over The Traditional Windowing Systems?
Answer :
Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.
Question 6. How A Gui Component Handle Its Own Events In Java Programming?
Answer :
A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.
Question 7. Name Primitive Java Types?
Answer :
The primitive types are byte, char, short, int, long, float, double, and boolean.
Answer :
The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented.
Question 9. Does A Class Inherit Constructors Of Its Superclass In Java Programming?
Answer :
A class does not inherit constructors from any of its superclasses.
Question 10. Define Map Interface In Java Programming?
Answer :
The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
Answer :
A class that is declared without any access modifiers is said to have package or friendly access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.
Question 12. Which Classes Of Exceptions May Be Caught By A Catch Clause In Java Programming?
Answer :
A catch clause can catch any exception that may be assigned to the Throwable type. This includes the Error and Exception types.
Answer :
Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines which task should execute next, based on priority and other factors.
Question 14. What Happens When A Thread Cannot Acquire Lock On An Object In Java Programming?
Answer :
If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.
Answer :
The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object.
Question 16. What Are Peerless Components?
Answer :
The peerless components are called light weight components.
Question 17. Which Package Has The Light Weight Components In Java Programming?
Answer :
javax.Swing package. All components in Swing, except JApplet, JDialog, JFrame and JWindow are lightweight components in Java Programming.
Question 18. When An Object Reference Be Cast To An Interface Reference In Java Programming?
Answer :
An object reference be cast to an interface reference when the object implements the referenced interface.
Question 19. Can You Please Explain The Difference Between Window And A Frame In Java Programming?
Answer :
The Frame class extends Window to define a main application window that can have a menu bar.
Answer :
A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.
Question 21. Described Object's Lock And Which Object's Have Locks In Java Programming?
Answer :
An object's lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object's lock. All objects and classes have locks. A class's lock is acquired on the class's Class object.
Question 22. Described Abstract Method In Java Programming?
Answer :
An abstract method is a method whose implementation is deferred to a subclass in Java Programming.
Question 23. What Are High-level Thread States In Java Programming?
Answer :
The high-level thread states are ready, running, waiting, and dead.
Question 24. What Must Class Do To Implement An Interface In Java Programming?
Answer :
It must provide all of the methods in the interface and identify the interface in its implements clause.
Answer :
The wait(),notify(), and notifyAll() methods are used to provide an efficient way for threads to communicate each other in Java Programming.
Answer :
The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.
Question 27. Described Locale Class In Java Programming?
Answer :
The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region.
Question 28. What Is The Purpose Of Runtime Class In Java Programming?
Answer :
The purpose of the Runtime class is to provide access to the Java runtime system in Java Programming.
Question 29. Described The Purpose Of System Class In Java Programming?
Answer :
The purpose of the System class is to provide access to system resources in Java Programming.
Answer :
validate(); : Container method is used to cause a container to be laid out and redisplayed in Java Programming.
Question 31. Described Properties Class In Java Programming?
Answer :
The properties class is a subclass of Hashtable that can be read from or written to a stream. It also provides the capability to specify a set of default values to be used.
Question 32. Described Gregorian Calendar Class In Java Programming?
Answer :
The GregorianCalendar provides support for traditional Western calendars in Java Programming.
Question 33. What Is Simpletimezone Class In Java Programming?
Answer :
The SimpleTimeZone class provides support for a Gregorian calendar in Java Programming.
Question 34. Which Invokes A Thread's Run() Method In Java Programming?
Answer :
After a thread is started, via its start() method or that of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.
Answer :
An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
Question 36. What Is Purpose Of Finalization In Java Programming?
Answer :
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
Question 37. Which Class Is Superclass For Every Class In Java Programming?
Answer :
Object class is the superclass for every class in Java Programming.
Question 38. Which Component Subclasses That Support Painting In Java Programming?
Answer :
The Canvas, Frame, Panel, and Applet classes support painting.
Question 39. Described Native Method In Java Programming?
Answer :
A native method is a method that is implemented in a language other than Java.
Question 40. How To Write A Loop Indefinitely In Java Programming?
Answer :
for(;;)-for loop; while(true)-always true, etc.
Answer :
Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.
Answer :
When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.
Question 43. Is The Size Of A Keyword In Java Programming?
Answer :
The sizeof operator is not a keyword in Java Programming.
Question 44. Described Wrapped Classes In Java Programming?
Answer :
Wrapped classes are classes that allow primitive types to be accessed as objects.
Question 45. Does Java Handle Integer Overflows And Underflows?
Answer :
It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.
Question 46. What Is Vector Class In Java Programming?
Answer :
The Vector class in Java Programming provides the capability to implement a growable array of objects.
Answer :
A (non-local) inner class may be declared as public, protected, private, static, final, or abstract.
Answer :
A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.
Question 49. What Is Iterator Interface In Java Programming?
Answer :
The Iterator interface is used to step through the elements of a Collection.
Question 50. Which Containers Is Use A Border Layout As Their Default Layout?
Answer :
The window, Frame and Dialog classes use a border layout as their default layout in Java Programming.
Question 51. Which Method Is Used To Specify A Container's Layout In Java Programming?
Answer :
The setLayout() method is used to specify a container's layout in Java Programming.
Question 52. Which State Does A Thread Enter When It Terminates Its Processing In Java Programming?
Answer :
When a thread terminates its processing, it enters the dead state.
Question 53. What Is Collections Api In Java Programming?
Answer :
The Collections API is a set of classes and interfaces that support operations on collections of objects.
Question 54. Define Llist Interface In Java Programming?
Answer :
The List interface provides support for ordered collections of objects.
Question 55. Can A Lock Be Acquired On Class In Java Programming?
Answer :
Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.
Question 56. Which Containers Use Flowlayout As Their Default Layout In Java Programming?
Answer :
The Panel and Applet classes use the FlowLayout as their default layout.
Question 57. Described Transient Variable?
Answer :
A transient variable is a variable that may not be serialized.
Question 58. What's New With Stop(), Suspend() And Resume() Methods In Jdk 1.2?
Answer :
The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.
Question 59. Define Preferred Size Of A Component In Java Programming?
Answer :
The preferred size of a component is the minimum component size that will allow the component to display normally.
Question 60. Which Three Ways In Which A Thread Can Enter The Waiting State In Java Programming?
Answer :
A thread can enter the waiting state by invoking its sleep() method, by blocking on I/O, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. It can also enter the waiting state by invoking its (deprecated) suspend() method.
Question 61. Described Synchronized Methods And Synchronized Statements In Java Programming?
Answer :
Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.
Question 62. Described Synchronization And Why Is It Important In Java Programming?
Answer :
With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often causes dirty data and leads to significant errors.
Question 63. How Observer And Observable Used In Java Programming?
Answer :
Objects that subclass the Observable class maintain a list of observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects.
Java Developer Related Tutorials |
|
---|---|
HTML 4 Tutorial | CSS3 Tutorial |
HTML 5 Tutorial | J2EE Tutorial |
Core Java Tutorial | JSP Tutorial |
Android Tutorial | Hibernate Tutorial |
Java Swing Tutorial |
Java Developer Related Practice Tests |
|
---|---|
HTML 4 Practice Tests | CSS3 Practice Tests |
HTML 5 Practice Tests | J2EE Practice Tests |
Core Java Practice Tests | JSP Practice Tests |
Android Practice Tests | Hibernate Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.