ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories >> Software >> Java-Related
 
  J2ME (99)  Java-Related-AllOther (21)
 


 

Back to Questions Page
 
Question
httt method
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   HCL
I also faced this Question!!   © ALL Interview .com
Answer
doget,dopost,doput,dohead,dooption,dodelete,dotrace
doget method default method.
 
2
Guest
 
 
Question
what is the use of reference variable
Rank Answer Posted By  
 Question Submitted By :: Azitkumarreddy
I also faced this Question!!   © ALL Interview .com
Answer
A reference variable is used to refer a particular object 
location which resides on a garbage collectable heap
 
0
Ravikiran(aptech Mumbai)
 
 
Question
what is the difference between Cpp And Java
Rank Answer Posted By  
 Question Submitted By :: Azitkumarreddy
This Interview Question Asked @   Infosys , Infosys
I also faced this Question!!   © ALL Interview .com
Answer
cpp is a pure object oriented programming,where as java is 
not because it doen't support multiple inheritance
 
0
Ravikiran(aptech Mumbai)
 
 
 
Answer
every one says java does not supports multiple inheritance 
but in java the multiple inheritance will be done .by using 
interface concept there the multiple inheritance will be 
done.

cpp had pointers
java does not had pointers
 
0
Shankar
 
 
Answer
cpp is not 100% object oriented programming language,
because primitives are not objects in cpp, 
whereas java is said to be 100% pure object oriented
programing language, because we can convert the primitives
into objects by using the concept called 'wrapping'.
 
0
Madhu
 
 
Question
If we disable cookies in our web page, what will happen?
Rank Answer Posted By  
 Question Submitted By :: Kalareddy
This Interview Question Asked @   Zensar
I also faced this Question!!   © ALL Interview .com
Answer
Cookies is used for identify to request.
if we disable the coookies then we cannot identify the 
request
 
2
Shailendra Sharma
 
 
Answer
If cookies are disabled in our browser, Session tracking 
gets failed.

To overcome this limitation URL Rewriting concept will be 
used.
 
3
Gajendra
 
 
Answer
to track web pages we can use

1. Cookies
2. URLRewriting
3. storing data in session
4. Using Hidden variable in form
 
0
Abc
 
 
Answer
if cookies are disable the session tracking gets failed it 
unable to identifies the clients previous request.

even cookies are disable we can maintain session with 
res.encodeURL("path") method.
 
0
Sekhar Babu
 
 
Answer
If we disable the cookies in our webpage then the it cant
identify the clients request.because there will be no
jsessionid  for our request.So it fails to remember our req
on the server .so once again it creates the sessionid for
another req.
 
0
Navatha
 
 
Question
Life Cycle of Thread
Rank Answer Posted By  
 Question Submitted By :: Tathagata
This Interview Question Asked @   IBM
I also faced this Question!!   © ALL Interview .com
Answer
A Thread has the following life cycles states
1.New/Born state:When a thread is just instantiated we say 
that the thread is in born state.now it can not compete for 
CPU cycles.
2.Active state:When we call the start() on thread object a 
thread moves from born state to active state.Here the code 
associated with run() will be executed.
3.Blocked state:When the thread is temporarily keep out of 
ready queue,we say that the thread is in blocked state. In 
this state it can't compete for CPU cycles.
4.Dead state:When the thread execution is completed or 
forcibly terminate the thread, it will be moved to dead 
state.
 
0
Gajendra
 
 
Answer
When an object is created using Thread class,it is in the 
new state, when the start method is called the object goes 
into the runnable state from where the scheduler picks up 
and starts executing. If that process requires any resource 
it is picked and put to the blocked state and when the 
process finished that thread is in dead state.
states:
1 new
2 runnable
3 running
4 blocked
5 dead
 
0
Guru
 
 
Question
how to minimize the functionality to will not force garbage 
collector?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
We cannot restrict garbage collector that all depends on the
garbage collector engine
 
0
Ravikiran(aptech Mumbai)
 
 
Answer
Yes, 

Garbage collection (GC) is a form of automatic memory 
management. The garbage collector, or just collector, 
attempts to reclaim garbage, or memory used by objects that 
will never be accessed or mutated again by the application. 
Garbage collection was invented by John McCarthy around 
1959 to solve the problems of manual memory management in 
Lisp.[1]
 
0
Abcdefg
 
 
Question
when we have to use final class in java?
Rank Answer Posted By  
 Question Submitted By :: Aravinthraj
I also faced this Question!!   © ALL Interview .com
Answer
Final class can not  be inherited.
 
0
Shailendra Sharma
 
 
Answer
A class is said to be final when i dnt want my class to be 
extended by any class so that methods implementation cannot 
be changed.
For ex String is a final class
 
0
Rana
 
 
Question
How u validate date in DD/MM/YY format. and how u validate 
money in ur jsp
Rank Answer Posted By  
 Question Submitted By :: Smrutiranjan_sahoo
This Interview Question Asked @   Tomax , Satyam Computers
I also faced this Question!!   © ALL Interview .com
Answer
Locale locale = Locale.GERMANY;
    String string =
NumberFormat.getCurrencyInstance(locale).format(123.45);
 
0
Test
 
 
Answer
you can use java regex pattern matchers to achieve that.
 
0
Sushant
 
 
Question
What is the difference between overloading and overriding a 
function?
Rank Answer Posted By  
 Question Submitted By :: Nauzer Kaifi
This Interview Question Asked @   Infosys , EG Innovative Solutions
I also faced this Question!!   © ALL Interview .com
Answer
overloading takes place at compile time and overriding 
takes place at run time.
 
0
Sai
 
 
Answer
In overloading two function should have different signature
but overriding show have exactly same signature.

Overloading generally happens in same class but overriding
mandatory requires super and sub class to happen.

Compiler decides overloading at compile time but overriding
is detected at run time.

Overloading is called static polymorphism while overriding
is called dynamic polymorphism.
 
4
Ankur Dhoot
 
 
Answer
Overload :Deals single class bluebrint method selection 
by using diffent proto type
(static buinding)


Overriding :Deals sub and super class bluebrints method 
selection by using same proto type
(Dynamic buinding)
 
0
Karthik
 
 
Answer
Over Loading : when two or methods share the same name but
paramater declaration are diffierent with in a class.
(ex:Compile time polymorpism)

Over ridding: when two or methods share the same name but
paramater declaration are also same in different classes.
(ex:run time polymorpism)
 
0
Suganthi
 
 
Question
Why do we use public static with the main function in Java?
Rank Answer Posted By  
 Question Submitted By :: Nauzer Kaifi
This Interview Question Asked @   Infosys
I also faced this Question!!   © ALL Interview .com
Answer
public is used so that it can be called easily from outside 
the scope of function.Static is used so that it can be 
easily called without using its object.
 
0
Sai
 
 
Answer
public means we are allowing the main method to be accessed
any where in the application.and is declared static because
jvm will look for the static one's once it completes the
loading the class.
 
0
Ravikiran(aptech Mumbai)
 
 
Answer
As we know public means we can access the method from 
anywhere.Coming to static:- main() is a static method 
therefore it implies that there is no need of creating 
Object for that particular class to call this method.So 
that when ever u run the program the Jvm will search for 
main() in the class even there r no class objects created 
for this class.
 
0
Rana
 
 
Answer
public means-accessable from anywhere
static means-the point ,from where compilar can start its 
compilation without object.
 
0
Abhijit
 
 
Question
Can we inherit the constructor in a Class?please give one 
example.
Rank Answer Posted By  
 Question Submitted By :: Chandramouli
This Interview Question Asked @   iGate
I also faced this Question!!   © ALL Interview .com
Answer
we cannot inherit constructors.
 
0
Sri
 
 
Answer
we cannot inherit constructors.
because if we declare a constructor it must be a same name 
as its class name, but two class must have same name
 
0
Sanketh
 
 
Question
What is the basic functionality of DataOutput interface in 
java?
Rank Answer Posted By  
 Question Submitted By :: Ravurivinod
This Interview Question Asked @   TCS
I also faced this Question!!   © ALL Interview .com
Answer
DataOut is a contract for DataOutputStream, whose main
intension is to write primtive data types and String into
stream , by converting them into bytes.
 
0
Sri
 
 
Answer
using this interface we can give the values to the run time 
input
 
0
Sakthivel(gceb)(n.p)pollachi
 
 
Question
Howmany number of objects we can store in an ArrayList. Is 
there any limit?
Rank Answer Posted By  
 Question Submitted By :: Ravurivinod
This Interview Question Asked @   TCS
I also faced this Question!!   © ALL Interview .com
Answer
the size we specify is the limit
 
0
Sri
 
 
Answer
The size will be as equal to int size.
 
0
Chandrashekhar
 
 
Answer
there is no restriction to store object in arraylist.it's 
default size is 10.wenever it's reaches the maximum size 
it's increase size(current capacity*3/2+1).
 
0
Rajender
 
 
Answer
no limit
 
0
Sakthivel(gceb)(n.p)pollachi
 
 
Question
What is the purpose of premetive data types in java?
Rank Answer Posted By  
 Question Submitted By :: Ravurivinod
This Interview Question Asked @   Merrill-Lynch
I also faced this Question!!   © ALL Interview .com
Answer
In java contains eight type of primitive data
type:byte,short,int,long,float,double,char,boolean..
In wrapper class is called converting ordinary variable into
objects.so this concept is used for collections in
java.because collection don't know data types..only object..
 
0
Parameswaran
 
 
Answer
primitive datatypes will allocate some memory in accordance
with the type of the variable
 
0
Ravikiran(aptech Mumbai)
 
 
Question
What is the difference between pageContext and page 
implicit objects in jsp?
Rank Answer Posted By  
 Question Submitted By :: Ravurivinod
This Interview Question Asked @   Merrill-Lynch
I also faced this Question!!   © ALL Interview .com
Answer
Hi shailendra

Thnks for your response, but iam asking what is the 
difference between page and pagecontext implicit objects in 
jsp?

Thanks & Regards
    Vinod
 
0
Ravurivinod
 
 
Answer
Page Implicit Object :
8 type of Implicit object are genreted when JSP file is 
converted into Servlet 

8 type of Implicit Object are 
(1)Page
(2)pageContext
(3)application
(4)session
(5)exception
(6)config
(7)request
(8)responce


pagecontext is type of implicit Object 

in pageContext two method is available
(1)include
(2)forward


it is equvaalect in servlet to RequestDispatcher
 
0
Shailendra Sharma
 
 
Answer
pagecontext is used to include or forward to another resource,
PageContext is used to save the scoped objects
PageContext is used to hold the page scoped attributes

where as page is the instance of the generated servlet
 
0
Ravikiran(aptech Mumbai)
 
 
Answer
Hi Ravikiran

Thanks for your quick response .

Thanks & Regards
    Vinodh.
 
0
Ravurivinod
 
 
Answer
page context is the apllication object,that can be used for 
entire aplication. and page config object is for one 
servlet generated object.
 
0
Anil Das
 
 
Answer
pageContext is used to get different scope objects like 
request,session,context etc. where as page object of jsp is 
used to refer the current page scope and can be compared 
with local variable declared.
 
0
Venkat
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com