<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Questions Archives - 123projectlab.com</title>
	<atom:link href="http://123projectlab.com/category/java-questions/feed/" rel="self" type="application/rss+xml" />
	<link>https://123projectlab.com/category/java-questions/</link>
	<description>Academic projects for MCA, BCA, B.Tech(CS/IT), MSc-IT, BSc-IT Final year student</description>
	<lastBuildDate>Tue, 29 May 2018 06:15:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://123projectlab.com/wp-content/uploads/2020/09/p-150x150.ico</url>
	<title>Java Questions Archives - 123projectlab.com</title>
	<link>https://123projectlab.com/category/java-questions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Java Interview Questions with Answer VOL.- 1</title>
		<link>https://123projectlab.com/interview-questions-with-answers-on-java-vol-1/</link>
					<comments>https://123projectlab.com/interview-questions-with-answers-on-java-vol-1/#respond</comments>
		
		<dc:creator><![CDATA[123ProjectLab]]></dc:creator>
		<pubDate>Tue, 29 May 2018 06:15:37 +0000</pubDate>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Java Questions]]></category>
		<category><![CDATA[interview questions]]></category>
		<category><![CDATA[Java]]></category>
		<guid isPermaLink="false">http://123projectlab.com/?p=666</guid>

					<description><![CDATA[<p>Are you preparing for JAVA interview questions? Here are few basic JAVA interview questions. These questions are asked in various JAVA interviews to know a candidates basic java programming skill. Here ... <a title="Java Interview Questions with Answer VOL.- 1" class="read-more" href="https://123projectlab.com/interview-questions-with-answers-on-java-vol-1/" aria-label="Read more about Java Interview Questions with Answer VOL.- 1">Read more</a></p>
<p>The post <a href="https://123projectlab.com/interview-questions-with-answers-on-java-vol-1/">Java Interview Questions with Answer VOL.- 1</a> appeared first on <a href="https://123projectlab.com">123projectlab.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Are you preparing for JAVA interview questions?</p>
<p>Here are few basic JAVA interview questions. These questions are asked in various JAVA interviews to know a candidates basic java programming skill.</p>
<h2>Here are some important Java Interview Questions with Answer</h2>
<h2>Q.1 What is the difference between a JDK and a JVM?</h2>
<p>Ans: JDK is Java Development Kit. JDK includes execution and used for development while JVM is a run time environment. We can not compile our source files using a JVM.</p>
<h2>Q.2 Name the base class of all classes?</h2>
<p>Ans: java.lang.Object</p>
<h2>Q.3  Is Java a pure object oriented programming language?</h2>
<p>Ans: Primitive data types are used by <strong>Java</strong> therefore it is not a pure object oriented programming language.</p>
<h2>Q.4  What are transient variables in java?</h2>
<p>Ans:  Transient variables are those variables that cannot be serialized.</p>
<p><strong>Recommended for you:</strong> <span style="text-decoration: underline; color: #ff0000;"><a style="color: #ff0000; text-decoration: underline;" href="http://123projectlab.com/tips-to-handle-a-phone-interview-successfully/">8 TIPS TO HANDLE A PHONE INTERVIEW SUCCESSFULLY  &#8211; 2017</a></span></p>
<h2>Q.5 What is Inheritance principle.</h2>
<p>Ans: Inheritance is an important principle in OOPs. An object acquires the properties of another object by using inheritance principle.</p>
<h2>Q.6  Tell different access Specifiers in Java?</h2>
<p>Ans: Different specifiers are:</p>
<p>Private<br />
Defaults<br />
Public<br />
Protected</p>
<h2>Q.7  What are local variables?</h2>
<p>Ans: Those variables which are declared within a block of code are local variables. These variables should be initialized before accessing them.</p>
<h2>Q.8 How can we define a constant variable in Java?</h2>
<p>Ans: The variable should be declared as static and final.</p>
<h2>Q.9 In all java classes, should a main() method must be compulsorily declared ?</h2>
<p>Ans:  main() method should be defined only when source class is a <em>java</em> application.</p>
<p><strong>Recommended for you:</strong> <span style="text-decoration: underline;"><span style="color: #ff0000;"><a style="color: #ff0000; text-decoration: underline;" href="http://123projectlab.com/interview-questions-with-answers-on-sql-vol-i/">SQL SERVER INTERVIEW QUESTIONS [SQL TUTORIAL] VOL.-1</a></span></span></p>
<h2>Q.10  Tell the use of the finally block in java?</h2>
<p>Ans: It is the block of code that executes always. This block of code will execute even when an exception is occurred. When the user calls System.exit() this block of code is not executed.</p>
<h2>Q.11  Tell the principles of OOPS.</h2>
<p>Ans: oops has three main principals :<br />
Polymorphism<br />
Encapsulation<br />
Inheritance.</p>
<h2>Q.12 Tell the return type of the main() method?</h2>
<p>Ans: Main() method is declared void it doesn&#8217;t return anything.</p>
<h2 style="text-align: center;"><span style="color: #ff0000;"><a href="http://123projectlab.com/category/sql-questions/" target="_blank" rel="noopener noreferrer"><span style="color: #ff0000;"><em><strong>Click Here for More Interview Questions</strong></em></span></a></span></h2>
<p>&nbsp;</p>
<h2>Q.13 Describe a package?</h2>
<p>Ans: It is a collection of related interfaces and classes. In a &#8216;java&#8217; class package declaration should be first statement.</p>
<h2>Q.14 Which package is imported by default?</h2>
<p>Ans: By default java.lang package is imported even without a package declaration.</p>
<h2>Q.15  Give some examples of final classes defined in Java API?</h2>
<p>Ans:  java.lang.Math, java.lang.String are final classes.</p>
<h2>Q.16  Is it possible to declare a static variable inside a method?</h2>
<p>Ans: Static varaibles are can&#8217;t be declared inside a method because Static varaibles are class level variables. If we declare them inside a method, the class will not compile.</p>
<h2>Q.17  Is it possible to declare an abstract class final?</h2>
<p>Ans:  No it is not possible. It will result in compile time error.</p>
<h2>Q.18  Is it possible to declare a class as protected?</h2>
<p>Ans: No we can not declare a class as protected. We can declare  methods as protected.</p>
<h2>Q.19  Describe the access scope of a protected method?</h2>
<p>Ans: We can access a protected method by the classes within the same package and also by the subclasses of class in any package.</p>
<h2>Q.20  Why main() method is declared static?</h2>
<p>Ans: main() method is declared as static because it is called by the JVM even before the instantiation of the class.</p>
<h2>Q.21 Tell the arguments of main() method?</h2>
<p>Ans:  It accepts an array of String object as argument.</p>
<h2>Q.22 Is it possible to overload a main() method ?</h2>
<p>Ans: We can overload main() method, we can have any number of main() methods having different method signature and implementation in the class.</p>
<h2>Q.23 Explain List interface ?</h2>
<p>Ans:  It is an ordered collection of objects.</p>
<p>&nbsp;</p>
<h2 style="text-align: center;"><span style="color: #ff0000;"><a href="http://123projectlab.com/category/sql-questions/" target="_blank" rel="noopener noreferrer"><span style="color: #ff0000;"><em><strong>Click Here for More Interview Questions</strong></em></span></a></span></h2>
<p>The post <a href="https://123projectlab.com/interview-questions-with-answers-on-java-vol-1/">Java Interview Questions with Answer VOL.- 1</a> appeared first on <a href="https://123projectlab.com">123projectlab.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://123projectlab.com/interview-questions-with-answers-on-java-vol-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Database Caching 27/42 queries in 0.011 seconds using Disk

Served from: 123projectlab.com @ 2026-05-01 18:39:19 by W3 Total Cache
-->