Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

Features

Struts Tutorials
*Stuts TOC
*Apache Struts Introduction
* Struts Controller
* Struts Action Class
* Struts ActionFrom Class
* Using Struts HTML Tags
*Struts Validator Framework    
*Client Side Address Validation    
*Struts Tiles
*tiles-defs.xml
*Struts DynaActionForm
*Struts File Upload
*Struts DataSource
*AGGREGATING ACTIONS
*Internationalization
Struts Resources
*Struts Books
*Struts Articles
*Struts Frameworks
*Struts IDE
*Struts Links
*Struts Presentations
*Struts Projects
*Struts Software
*Other Struts Tutorial
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Java Interview Questions - Page 1

                         

Java Interview Questions by Inigo Nirmal

Question: Can a private method of a superclass be declared within a subclass?
Answer:
Sure. A private field or method or inner class belongs to its declared class and hides from its subclasses. There is no way for private stuff to have a runtime overloading or overriding (polymorphism) features.

Question: Why Java does not support multiple inheritence ? 
Answer:
Java DOES support multiple inheritance via interface implementation.
   

Question:What is the difference between final, finally and finalize?
Answer:
o final - declare constant
               o finally - handles exception
               o finalize - helps in garbage collection
   

Question: Where and how can you use a private constructor.
Answer:
Private constructor can be used if you do not want any other class to instanstiate the object , the instantiation is done from a static public method, this method is used when dealing with the factory method pattern when the designer wants only one controller (fatory method ) to create the object.
   

Question: In System.out.println(),what is System,out and println,pls explain? 
Answer:
System is a predefined final class,out is a PrintStream object and println is a built-in overloaded method in the out object.
   

Question: What is meant by "Abstract Interface"? 
Answer:
First, an interface is abstract. That means you cannot have any implementation in an interface. All the methods declared in an interface are abstract methods or signatures of the methods.
    

Question: Can you make an instance of an abstract class? For example - java.util.Calender is an abstract class with a method getInstance() which returns an instance of the Calender class. 
Answer:
No! You cannot make an instance of an abstract class. An abstract class has to be sub-classed. If you have an abstract class and you want to use a method which has been implemented, you may need to subclass that abstract class, instantiate your subclass and then call that method.
   

Question: What is the output of x<y? a:b = p*q when x=1,y=2,p=3,q=4?
Answer:
When this kind of question has been asked, find the problems you think is necessary to ask before you give an answer. Ask if variables a and b have been declared or initialized. If the answer is yes. You can say that the syntax is wrong. If the statement is rewritten as: x<y? a:(b=p*q); the return value would be variable a because the x is 1 and less than y = 2; the x < y statement return true and variable a is returned.

Question: What is the difference between Swing and AWT components?
Answer:
AWT components are heavy-weight, whereas Swing components are lightweight. Heavy weight components 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.

Question: Why Java does not support pointers?
Answer: Because pointers are unsafe. Java uses reference types to hide pointers and programmers feel easier to deal with reference types without pointers. This is why Java and C# shine.

                         

Ask programming questions?

 

 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

24 comments so far (post your own) View All Comments Latest 10 Comments:

i need java qustions

Posted by kalidas.R on Monday, 11.9.09 @ 12:11pm | #92436

I need Core Java programatic technical questions

Posted by veera on Monday, 10.26.09 @ 18:58pm | #92137

i have one question,
i am using java based public chatroom, there is any way to get members ip address??

Posted by purushoth on Saturday, 05.9.09 @ 10:48am | #87549

how is implement the java in a real life.

which type of think to according to java.

Posted by siraj on Monday, 04.6.09 @ 17:46pm | #86560

is java having operteroverloading ifno.then why we use + operater on concatination of string and addition

Posted by jeevan on Wednesday, 04.9.08 @ 16:57pm | #55741

hi
my name is mitesh can y ask me Question of interview i core java how i can giving a propre interview in java

Posted by mitesh on Tuesday, 03.25.08 @ 11:57am | #54234

I am re-learning java after a long time.

AFAIK, interfaces are all abstract. They are generally declared as:

<access specifier> interface <InterfaceName> {
// abstract methods
}

So what is this new thing called "abstract interface" ?? I see this in quite a few places these days:

<access specifier> abstract interface <InterfaceName> {
// abstract methods
}

What good is this "abstract" doing here?

TIA

Posted by Murani on Thursday, 11.15.07 @ 09:30am | #37454

interview questions are helpful in getting entry and some time it will clear th concept also ..if some one dont know

Posted by sujit kumar on Tuesday, 10.9.07 @ 12:01pm | #32614

this is a very helpful site .......
but make it user frdly by developing it prin frdly.....

Posted by Gautam mishra on Saturday, 09.1.07 @ 09:53am | #24679

Thanks for providing these interview questions.
reaslly these are very usefull for interview purpose. I expect more than this to be presented soon.


Posted by sera on Saturday, 07.14.07 @ 23:00pm | #21291

  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name

 

 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.

[an error occurred while processing this directive]