GeekInterview.com
Series: Subject: Topic:

Java FAQ

Showing Questions 1 - 20 of 995 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

Which of the following declare an array of string objects? (select multiple)

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) string[ ] s;b) string [ ]s:c) string[ s]:d) string s[ ]:

Answered by: gogula on: May 19th, 2013

d

Answered by: jo on: Oct 30th, 2012

d

What are the types of exceptions in Java?

Asked By: nithya | Asked On: Sep 12th, 2005

Answered by: avinash on: May 10th, 2013

There are two types

1.Checked
2.Unchecked

Answered by: padmaja on: Dec 11th, 2012

Unchecked exceptions are you are not understood at compile time. It is a critical problem for the user.

The concept of polymorphism is often expressed by the phrase

Asked By: Interview Candidate | Asked On: Jan 9th, 2006

Skill/topic: awt & appletsa) one interface, multiple methodsb) multiple interface, one methodc) multiple interface, multiple methodd) one interface, one method

Answered by: mr key on: Mar 25th, 2013

B

Answered by: Geetika on: Jan 13th, 2006

The concept of polymorphism is often expressed by ...

Single Interface, Multiple methods

Java was initially called as _____

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) oak

Answered by: Manickam on: Mar 15th, 2013

No. Java was intially called "Green".
This is correct answers

Answered by: visalakshi adaikkalavan on: Jan 7th, 2010

Oak

State true or false :- a class is a template for multiple objects with similar features.

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) trueb) false

Answered by: Dipika on: Mar 13th, 2013

True

Answered by: ahmed on: Mar 11th, 2013

true

Java was conceived by james gosling, patrick naughton, chris warth, ed frank, and mike sheridan

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) trueb) false

Answered by: pradip on: Mar 7th, 2013

Yes its true.

Answered by: ragini on: Jan 2nd, 2013

The statement is True

In order for a source code file, containing the public class test, to successfully compile, which of the following must be true?

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) it must have a package statementb) it must be named test.Javac) it must import Java.Langd) it must declare a public class named test

Answered by: zain on: Mar 6th, 2013

A) It must have a package statement

Answered by: sujatawankhede on: May 25th, 2006

hi, offcourse it is B.when file is complied ,it is save as .java extention...thanku....

Swing provides ________ text components

Asked By: Interview Candidate | Asked On: Jan 9th, 2006

Skill/topic: awt & appletsa) fourb) sixc) sixteen d) thirtytwo

Answered by: anita ahuja on: Feb 28th, 2013

B) Six

Answered by: Himanshu Joshi on: Aug 7th, 2006

Swing provides six text components.All of Swing's text components inherit from the same superclass, JTextComponent.

 - Himanshu

Call main function explicitly

Asked By: sahil5 | Asked On: Jun 21st, 2010

Can we call the main function explicitly? If yes, how?

Answered by: Raghunadh Parlapalli on: Feb 13th, 2013

Thats an excellent question. Try this, It works. Because main() is a static method. So, We can call static methods from another class static method. ClassB { public static void main(String[] args) { ...

what is meant by encapsulation ? Explain with an example

Asked By: Interview Candidate | Asked On: Sep 2nd, 2005

Answered by: priyanka on: Feb 11th, 2012

Protective wrapper that prevents the code and data from being arbitrarily accessed by the other code defined outside the wrapper.

Answered by: nagendra on: Dec 17th, 2011

Binding of data and methods into a single unit is called encapsulation.

There are _____ types of comments in Java

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) one b) two c) threed) four explanation: there are 3 types of comments namely single-line, multi-line and documentation comment

Answered by: bhavana on: Dec 27th, 2012

4

Answered by: Sheriffh on: Feb 4th, 2009

Three

Convert list object to map object

Asked By: pragya03 | Asked On: Sep 29th, 2010

How to convert list object in to map object?

Answered by: sree on: Nov 6th, 2012


List list;
Map map = new HashMap();
for (Item i : list) map.put(i.getKey(),i);

How many ways to create an object in Java??? Plz give an example.

Asked By: amitbca32000 | Asked On: Jan 31st, 2006

Answered by: Hari on: Nov 2nd, 2012

Only 4 ways.
1) Class c=new Class(); -->Using new operator
2) Class.forName("Class"); -->Using class.forName
3) NumberFormat object=NumberFormat.getNumberInstance(); -->Using Factory methods
4) Class c=new Class();
Class c2=(Class)c.clone(); -->using Cloning

Answered by: praveen on: Aug 8th, 2012

1.newInstance()
2.static factory()
3.InstanceFactory()
4.factoryPattern()
5.deserialization
6clonning
7.new keyword.

what is meant by packages

Asked By: Interview Candidate | Asked On: Sep 2nd, 2005

Answered by: krish on: Oct 31st, 2012

packages is nothing but Classes and Interfaces and sub-packages.
Sub-packages is nothing but Classes and Interfaces and sub-sub-packages.

Answered by: Prashant Wayal on: Oct 19th, 2012

A package is a container which consists of classes and interfaces.

Python programming

Asked By: robert25 | Asked On: Oct 23rd, 2012

How do I write a module to keep count of the amount of guesses it takes to guess the number correctly?

what is meant by a wrapper class

Asked By: Interview Candidate | Asked On: Sep 8th, 2005

Answered by: karthika on: Oct 18th, 2012

wrapper classes are the base class for the primitive datatypes.To be accessed as objects;
wrapper classes are used to be able to use primitive datatypes as objects...............

Answered by: varun sharma on: Dec 6th, 2006

another informative thing is;

there are 8 wrapper classes in J2EE

is there any tool in Java that can create reports

Asked By: Interview Candidate | Asked On: Jun 24th, 2005

Answered by: Elangovanjavanandhan on: Aug 31st, 2012

java is a platform independent and pure object oriented programming language. the java programs mainly developed for embedded system application.

Answered by: Sharmila on: Mar 28th, 2007

JasperReports is a powerful open source Java reporting tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV and XML files.
Check this link out http://java-source.net/open-source/charting-and-reporting/jasperreports

Compress string

Asked By: Darsh_singh | Asked On: Oct 21st, 2010

How to compress a string (algorithem)?

Answered by: Sandhya.Kishan on: Aug 1st, 2012

"java import java.io.ByteArrayOutputStream; java.io.IOException; import java.util.zip.GZIPOutputStream; import java.util.zip.*; public class zipUtil{ public static String compress...

Bytecode to sourcecode

Asked By: asdf810 | Asked On: May 7th, 2009

How to convert bytecode to sourcecode?

Answered by: Sandhya.Kishan on: Aug 1st, 2012

A Java Decompiler (JD) can convert back the Bytecode (the .class file) into the source code (the .java file).

Java deadlock

Asked By: jimmy514in | Asked On: Oct 21st, 2010

How to avoid deadlock in Java?

Answered by: Sandhya.Kishan on: Aug 1st, 2012

A deadlock occurs when one thread has the control for A and tries to get the control for B while another thread has the control for B and tries to get the control for A. Each will wait forever for the...

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.