Java programming basic and advance interview question answer. Java coding example. Banking, Financial, Computer related and Software related abbreviation. Computer storage devices. PC to PC files transfer using WiFi. Introduction to Network Topology. Difference Between Hub Switch and Router. Difference Between Wired and Wireless Network. Advantages and Disadvantages of Computer Network. Networking Interview Questions for Experienced. Basic Networking Interview Questions.

Monday, October 1, 2018

300+ Java Interview Questions for Freshers

 Java Interview Questions for Freshers

Java Question For Freshers
Java Question For Freshers

Page No:-5

201.Which of the following statement is the disadvantage of an java array?

a. An array is checked at the of compile-time. 
b. Every array has its size that is known as array length. 
c. An array can hold primitive types data. 
d. An array holds only one type of data in java.   

202.Which of the following is true in java?

a. A finally block is executed after the try block but before the catch block.
b. A finally block is executed,only after the catch block is executed.
c. A finally block is executed whether an exception is thrown or not.   
d. A finally block is executed, only when exception occurs.

203.What is Ingres?

a. Keyword
b. Compiler
c. Database  
d. server

204.Below Which language is case sensitive?

b. XML 
c. Both A & B
d. None of the above

205.Who is responsible to interact with 'view' and 'controller' in MVC?

a. View
b. Model   
c. Controller
d. None of the above

206.Which method is used to starts the execution of the thread?

a. public void stop() 
b. public void run()
c. public void start()   
d. public void suspend()

207.Who helps to control The life cycle of the thread?

a. JRE 
d. None of the above

208.Which of the following statements are true regarding the finalize( ) method?

a. The finalize ( ) method must be declared with protected accessibility.
b. The finalize ( ) method can be overloaded.   
c. The finalize() method cant be overloaded.
d. None of the above 

209.Which of the following statements is true about a constructor?

a. A constructor must have the same name as declared the class name.
b. A constructor is used to create objects.
C. A constructor may be declared as private.
d. All of the above    

210.Which of the following package is used to enable interaction with garbage collector?

a. java.lang.ref   
b. java.lang.reflect
c. java.util package
d. package

211.Full form of DOM?

a. Developed Object Model
b. Document Oriented Model  
c. Document Object Model    
d. None of the above

212.Wrapper classes are used to convert any data type into an object.

a. True  
b. False

213.JDBC is a Java API that is used to connect and execute query to the database.

a. Yes  
b. NO

214.Which is used to store data and partial results and dispatch exceptions?

a. Window
b. Panel
c. Frame   
d. Container

215.Which of the following class automatically flushes the data so that there is no need to call the flush() method.

a. Console class
b. PrintStream class  
c. FileInputStream class
d. Scanner Class   

216.In JDBC below which statement imports all Java classes to concerned with database connectivity?

a. java.sql.*  
b. java.mysql.*
c. javax.sql.*           
d. None of the Above

217.Which technology can access presentation logic as well as business logic?

a. Servlet
b. JSP  
c. Model
d. None of the above

218.Which of the following method is used for SQL statement that is executed frequently?

a. createStatement 
b. prepareCall
c. prepareStatement   
d. None of the above

219.Below which method is inherited by Applet from its parent class?


220.Where primitive data type values store?

a. Stack Memory  
b. Heap Memory
c. Internal memory
d. Both A & B

221.Which of the following method of DataInputStream class that reads a line from the file and returns it as a string?

a. WriteInt()
b. readLine()   
c. readInt()
d. writeLine()

222.What of the following interface is used to execute parameterized query?

a. Statement interface
b. ResultSet interface 
c. PreparedStatement interface 
d. None of the above

223.Which Stream class can read binary data such as image from the request object?

a. ServletOutputStream   
b. ServltInputStream   
c. ServletStream 
d. None of the above

224.Which of the following method returns a reference to the currently executing thread object?

a. runnableThread() 
b. runningThread()
c. currentThread() 
d. None of the above

225.Abbreviate term of COM?

a. Common Object Model  
b. Component Oriented Model
c. Component Object Model    
d. None of the above

226. smt=con.createStatement() is used for which purpose.

a. A Statement object is created to execute parameterized SQL commands
b. A Statement object is created to send sql commands to the database   
c. A callable Statement is created to send sql commands to the database
d. A Prepared Statement object is created to send sql commands to the database  

227.Which of the following method of object class can clone an object?

a. Objectclone() 
b. Objectcopy()
c. Clone()
d. None of the above

228.By default Object class is a parent class of all the classes in java. 

a. True   
b. False

229.How many reserved keywords are currently defined in the Java language?

a. 52
b. 50   
c. 48    
d. 45

330.Who belongs in java.lang package?

a. List
b. Math 
c. Queue   
d. Stack 

231.What is used to run an Applet?

a. An Applet Viewer tool
b. An html file
c. Both A & B   
d. Class file

232.What is the difference between bellow two statements? a = 10;
2.Integer b = new Integer(85);

a. Both are Primitive data types
b. Both are Wrapper class 
c. primitive data type and object of a wrapper class   
d. None of the above

233.Which container that doesn't contain title bar and Menu Bars but it contain like button,text field etc?

a. Window
b. Panel   
c. Frame   
d. Container

234.Who allows hyperlinks to point to specific parts of XML documents?

a. XPath
b. Xpointer
c. XLink
d. XML

235.What is the full form of UDA?

a. Unified Data Access
b. universal Digital Access 
c. Universal Data Access   
d. None of the above

236.    ________ internet language is used for describing available web services in XML?

a. RDF
b. RSS
c. WSDL  
d. OWL

237.In java if super class is Serializable?  Does that mean child class is automatically Serializable?


238.Which of the following server is used for loading the init() method of servlet.

a. Web server    
a. client server
b. Both a&b
c.None of the above

239.Which language help us to finding information of an XML document?

a. XLink 
c. Xpath   
d. XpathPointer

240.Which of the following operators is used to get run time information about an object?

a. getInfo 
b. instanceof  
c. Info  
d. None of the above

241.Which of the following packages represent interfaces and classes for servlet API?

a. javax.servlet.http
b. javax.servlet  
c. Both A & B          
d. None of the above

242.Which one of the following is not true in java?

a. abstract method only contain non-abstract methods.  
b. abstract methods should be implemented in the derived class.
c. if a class contain abstract methods is called an abstract class.  
d. None of the above.

243.Which of the following constructor is used to provide different values to the distinct objects?

a. Default constructor
b. Overloading constructor 
c. Parameterized constructor  
d. None of the above

244.Which of the following server-side component is required to be deployed on the server?

a. RMI
b. EJB   
c. Both A & B
d. None of the above

245.Which driver is used to connect ODBC driver with database?

a. JDBC-ODBC bridge driver  
b. Native API driver
c. Network Protocol driver 
d. None of the above

246.Default port number of RMI Registry.

a.  3306  
b. 1099  
c. 1089
d.None of the above

247.GUI belongs in Which package ?

a. java.lang
b. java.lang.ref
c. java.awt   

248.Which of the following class provides thread safe implementation of List? 

a. ArrayList
b. Set
c. HashList
d. CopyOnWriteArrayList

249.Which of the following class provides more methods for graphics programming?

a. java.awt.Graphics   
b. java.Graphics
c. java.awt 
d. None of the above

250.Whether static method can use non static members?


[  Ans:- 201.d   202.c   203.c   204.b   205.b   206.c   207.b   208.b   209.d   210.a   211.c   212.a   213.a   214.c   215.b   216.c   217.b   218.c   219.a   220.a   221.b   222.c   223.b   224.c   225.c   226.b   227.a   228.a   229.b   230.c   231.c   232.c   233.b   234.b   235.c   236.c   237.a   238.a   239.c   240.b   241.c   242.a   243.c   244.b   245.a   246.b   247.a   248.d   249.a   250.b ]


No comments:

Post a Comment