Try to introduce some of your most important employment-oriented skills as well as your education and accomplishments to the interviewer. Answer to this question is very important because it positions you for the rest of the interview. That's why this statement is often called the " Positioning Statement".

One should take the opportunity to show his/her communication skills by speaking clearly and concisely in an organized manner. Since there is no right or wrong answer for this question hence it is important to appear friendly.

YOUR ANSWERS CAN BE:

1) I am a person with strong interpersonal skills and have the ability to get along well with people. I enjoy challenges and looking for creative solutions to problems.

2) Besides the details given in my resume, I believe in character values, vision and action. I am quick in learning from mistakes. I am confident that the various tests that you have conducted will corroborate my competencies aptitude and right attitude for th…

Page VI - Java Interview Questions With Answers.

Get link

Facebook

Twitter

Pinterest

Google+

Email

Other Apps

126. What Is The Difference Between An Interface & An Abstract Class?

Answer: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation.

127 .Can An Interface Extend Another Interface?

Answer: Yes an Interface can inherit another Interface, for that matter an Interface can extend more than one Interface.

128. If A Method Is Declared As Protected, Where May The Method Be Accessed?

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.

129. What Will Happen If Static Modifier Is Removed From The Signature Of The Main Method?

Answer: Program throws "NoSuchMethodError" error at runtime.

130. What Is The Default Value Of An Object Reference Declared As An Instance Variable?

Answer: Null, unless it is defined explicitly.

131. What Is Nested Top-Level Class? Can A Top Level Class Be Private Or Protected?

Answer: If a class is declared within a class and specify the static modifier, the compiler treats the class just like any other top-level class. Nested top-level class is an Inner class.

No, a top level class can not be private or protected. It can have either "public" or no modifier.

132 .Why Do We Need wrapper Classes?

Answer: We can pass them around as method parameters where a method expects an object. It also
provides utility methods.133. What Is The Difference Between Error & An Exception?

Answer: An error is an irrecoverable condition occurring at runtime. Such as OutOfMemory error. Exceptions are conditions that occur because of bad input etc. e.g. FileNotFoundException will be thrown if the specified file does not exist.

134. Describe Life Cycle Of Thread?

Answer: A thread is a execution in a program. The life cycle of a thread include:

Newborn state

Runnable state

Running state

Blocked state

Dead state

135. When A Thread Is Created & Started, What Is Its Initial State?

Answer: A thread is in the ready state as initial state after it has been created and started.

Answer: suspend is used to pause or temporarily stop the execution of the thread. IsAlive is used to find out whether a thread is still running or not. Currentthread is a public static method used to obtain a reference to the current thread.

137. Explain Main Thread Under Thread Class Execution?

Answer: The main thread is created automatically and it begins to execute immediately when a program starts. It is a thread from which all other child threads originate.

138. What Is Daemon Thread? Which Method Is Used To Create The Daemon Thread? Which Method Must Be Implemented By All Threads?

Answer: Daemon thread is a low priority thread, which runs intermittently in the background doing the garbage collection operation for the java runtime system. setDaemon method is used to create a daemon thread.

All tasks must implement the run method

139. What Is The Locale Class?

Answer: The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region.140. What Are Synchronized Methods & Synchronized Statements?

Answer: Synchronized methods are methods that are used to control access to an object. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.

141. What Is Runtime Polymorphism Or Dynamic Method Dispatch?

Answer: Runtime polymorphism or dynamic method dispatch is a process in which a call to an overridden method is resolved at runtime rather than at compile-time. In this process, an overridden method is called through the reference variable of a superclass.

142. Which Object Oriented Concept Is Achieved By Using Overloading & Overriding?

Answer: Polymorphism

143. What Is Dynamic Binding?

Answer: Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run-time.

144. Can Constructor Be Inherited? Where & How Can You Use A Private Constructor?

Answer: No, constructor cannot be inherited.
Private constructor is used if you do not want other classes to instantiate the object and to prevent
subclassing.

145. What Is Constructor Chaining & How Is It Achieved In Java?

Answer: A child object constructor always first needs to construct its parent. In Java it is done via an implicit call to the no-args constructor as the first statement.

146. What Are The Advantages Of ArrayList Over Arrays?

Answer: ArrayList can grow dynamically and provides more powerful insertion and search mechanisms than arrays.

147. Why Deletion In LinkedList Is Fast Than ArrayList?

Answer: Deletion in linked list is fast because it involves only updating the next pointer in the node before the deleted node and updating the previous pointer in the node after the deleted node.148. How Do You Decide When To Use ArrayList & LinkedList?

Answer: If you need to frequently add and remove elements from the middle of the list and only access the list elements sequentially, then LinkedList should be used. If you need to support random access, without inserting or removing elements from any place other than the end, then ArrayList should be used.

149. What Is A Values Collection View ?

Answer: It is a collection returned by the values method of the Map Interface, It contains all the objects present as values in the map.

150. What Is Dot Operator? What Is The Difference Between The >> and >>> Operators?

Answer: The dot operator. is used to access the instance variables and methods of class objects.It is also used to access classes and sub-packages from a package.

The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.

Also Read

Try to introduce some of your most important employment-oriented skills as well as your education and accomplishments to the interviewer. Answer to this question is very important because it positions you for the rest of the interview. That's why this statement is often called the " Positioning Statement".

One should take the opportunity to show his/her communication skills by speaking clearly and concisely in an organized manner. Since there is no right or wrong answer for this question hence it is important to appear friendly.

YOUR ANSWERS CAN BE:

1) I am a person with strong interpersonal skills and have the ability to get along well with people. I enjoy challenges and looking for creative solutions to problems.

2) Besides the details given in my resume, I believe in character values, vision and action. I am quick in learning from mistakes. I am confident that the various tests that you have conducted will corroborate my competencies aptitude and right attitude for th…

WHAT ARE YOU LOOKING FOR IN THIS JOB? / WHAT ARE YOUR EXPECTATIONS FROM THE JOB?

The interviewer simply wants to check out what you are expecting from the job. Never relate your answer to position, status or money associated with the job. Your answer should show that you are really determined to add value to the organization and yourself too.

Your answers can be:

1) I would like a job which gives me a chance to apply all that I have learned in college and enable me to grow as a professional. I would like a role which enables me to make a difference and improve my skills.

2) Great learning opportunities, challenging roles, rational career progression and good job satisfaction. I would also like to work for an organization that gives me an opportunity to serve the organization, the society and above all my country.

3) I seek three things from the job: Competence, Challenging Roles and learning opportunities. I want a position where I can apply my skills and abilities at par so that I can…