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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 


 

Company >> ACC >> Interview Questions >> Core Java Interview Questions
 
  C Code Interview Questions (1)   General Aptitude Interview Questions (1)   APPSC AllOther Interview Questions (1)
  Call Centre AllOther Interview Questions (7)   Accounting AllOther Interview Questions (7)   Taxation Interview Questions (2)
  CompanyAffairs CS Interview Questions (1)   Business Management AllOther Interview Questions (1)   Marketing Sales Interview Questions (2)
  Electrical Engineering Interview Questions (5)   Mechanical Engineering Interview Questions (1)   WebMethods Interview Questions (1)
  Oracle Apps Financial Interview Questions (3)   Oracle Apps Technical Interview Questions (2)   Siebel Interview Questions (1)
  SAP CRM Interview Questions (1)   HR Interview Questions (1)   FI CO Interview Questions (6)
  MM Interview Questions (2)   SD Interview Questions (3)   ABAP Interview Questions (4)
  HR Questions Interview Questions (6)   Data Warehouse General Interview Questions (1)   ETL Interview Questions (1)
  SAS Interview Questions (3)   Informatica Interview Questions (1)   JDBC Interview Questions (1)
  Core Java Interview Questions (3)   JCL Interview Questions (1)   Test Documents Reporting Interview Questions (1)
  Test Cases Interview Questions (1)   Manual Testing Interview Questions (7)   Automation Testing AllOther Interview Questions (1)
  QTP Interview Questions (1)   WinRunner Interview Questions (3)   Data Structures Interview Questions (1)
  SQL PLSQL Interview Questions (6)   MySQL Interview Questions (8)   SQL Server Interview Questions (1)
  Dot Net AllOther Interview Questions (1)   Dot Net General Interview Questions (1)   Dot Net Framework Interview Questions (1)
  ASP.NET Interview Questions (1)   C Sharp Interview Questions (2)   Networking Administration Interview Questions (3)
  Programming Languages AllOther Interview Questions (1)   C Interview Questions (5)
 
Back to Questions Page
Question   If a multi threaded Java program has started numerous number of threads, at any point in time how to know which thread is currently executing/running ? Rank Answer Posted By  
 Interview Question Submitted By :: Akj504
I also faced this Question!!   © ALL Interview .com
Answer
Using Java Debugger "jdb" one gets information about
which thread currently executing threads
 
0 Chellammal
 
 
Answer
but if I want check/findout within my program itself 
How do I do that ?
 
0 Akj504
[IT]
 
 
Answer
You can check by putting following code in your program

Thread t = Thread.currentThread();
System.out.println("Current Thread: "+t);

 
0 Namita Kapoor
[IT]
 
 
 
Answer
Check executing/running current thread by

currentThread() [Method]

public static Thread currentThread() 

Find the currently executing thread. 

Returns: 

the currently executing thread
 
0 Adminraj
[IT]
 
 
Answer
by using currentThread() Method ,we can find which thread 
is runing
 
0 Srinivas
[IT]
 
 
Answer
We can check the current Thread name as 
Thread t= new Thread.currentThread();
System.out.println(t.getName());
 
5 Ankush Sharma
[IT]
 
 
Question   Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang> Rank Answer Posted By  
 Interview Question Submitted By :: Esha Prasad
I also faced this Question!!   © ALL Interview .com
Answer
Over loading is polymorphism implementation in same class, 
where two or more methods can share same name differing in 
parameters passed.
Overriding is polymorphism implementation in different 
classes having parent child relationship and the 
funtionality in parent class is over shadowed by the 
funtionality in subclass.
 
4 Esha Prasad
 
 
Answer
Overloading class has different returntype.
overloading comes with in class but overriding comes in two 
classes.
Overloading is resolved at compiletime
Overriding is resolved at runtime.
 
0 Rakesh
 
 
Answer
overloading means same method name but different parameters 
are passed but overriding means same method name with same 
parameters passed in different classes.
 
5 Arthi
 
 
Answer
overloading : can only be done by changing the type or no.
of parameters for eg:a(int a);
a(int a,int b);


while in case of overriding we can give new definition
without changing the parameters.
 
0 Varun
 
 
Question   What do u mean by wrapper Class? What do u mean by Jvm... How do u change JVM for other OS? Or No need to Change ...? its like tricky Rank Answer Posted By  
 Interview Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
In general in java language everything is object  but 
Primitive data types are not objects.We need a conversion 
from primitive data type to object .For this conversion 
java provides Wrapper classes.
datatype      Wrapper class
     int-------Integer
     float-----Float
     double----Double
     long------Long
     short-----Short
     byte------Byte
     char------Char
 
2 Babu
 
 
Answer
wraper classes that  allow  primitive types to be accessed
as objects.
These classes are similar to primitive data types but
starting with capital letter.
Number          Byte               Boolean         
Double          Short              Character 
Float           Integer
 
0 Penchala
 
 
Answer
The Wrapper class represents the base class for a set of 
data sources. This class provides library initialization 
services and access to the data source servers that the 
wrapper supports. The Wrapper class maintains the following 
information: 
The wrapper name. 
The wrapper core library name. The returned name is the 
name of the native library that loaded the wrapper. 
A WrapperInfo object that contains all of the information 
that pertains to this wrapper. This information gets stored 
in the federated server's system catalog as a result of 
issuing the DDL statements CREATE WRAPPER or ALTER WRAPPER. 
The Wrapper class is a wrapper class for the Java API. 

JVM (Java Virtual Machine): A Java runtime environment, 
required for the running of Java programs, which includes a 
Java interpreter. A different JVM is required for each 
unique operating system (Linux, OS/2, Windows 98, etc.), 
but any JVM can run the same version of a Java program.
 
0 Rajashree
 
 
Answer
wrapper class is the one which will allow the primitive
datatypes to be used as objects.

Jvm is the java virtual machine which will convert the byte
code to user understandable code.

 
0 Ravikiran
 
 
Answer
"Wrapper class" has two meanings.
A class with a similar name to a primitive type, which 
encapsulates the value of that primitive, and provides 
methods which relate to that sort of primitive.
A class which calls methods of something else, and adds an 
additional layer of functionality.
The first sort includes Integer, Double, etc, and there are 
(I think) also classes like Void. Also an interface called 
NullType.

In the 2nd sort you could have a List and surround it with 
a class which calls all the List methods, but makes sure 
that all the calls become thread-safe. Look in the 
Collections class for methods like synchronizedList.
 
0 Rajesh
 
 
 
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