Java Interview Questions
- 0of 0 votes
AnswersWhat is Spring IOC?
- aquila.25 February 27, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Java - 0of 0 votes
AnswersHow do you write a ping routine in Java
- vimit February 18, 2010| Report Duplicate | Flag | PURGE
Microsoft Java - 0of 0 votes
Answersclass a
- anonymous February 03, 2010
{
public static void main(String args[])
{
c B=new c();
gen(B);
System.out.println(B.B1[0].x);
}
static void gen(c C1)
{
C1.B1[0].x=5;//bug in the line
C1.B1[1].x=6;
C1.B1[2].x=7;
}
}
class b
{
int x;
}
class c
{
b B1[]=new b[3];
}
there is a bug as shown in above program ?what is that bug? solve the bug?(program is in java language)| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Java - 0of 0 votes
AnswersWrite a Class describing Singleton pattern
- Nithesh January 13, 2010| Report Duplicate | Flag | PURGE
LSI Software Engineer / Developer Java - 0of 0 votes
AnswersCan Java constructor has private or protected access type?
- peter January 03, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersIf you want to implement a class includes firstname and lastname, then implement equals() and hashcode()
- peter January 03, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersTalk about collection framework of Java.
- peter January 03, 2010
What will happen if we add the same object to the Set?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersAbout Junit. If I have 2 test cases A and B where A depends on B then how wil I run these test cases using Junit
- emma December 22, 2009| Report Duplicate | Flag | PURGE
Sonoa Systems Testing / Quality Assurance Java Testing - 0of 0 votes
AnswersWrite a function to e reverse the order of words in a sentence using constant extra space
- Jyothsna December 18, 2009
eg: "Here I am" would be "am I Here".
I tried to solve this problem by taking the space as delimiter and inserting each word rfrom the string into a stringbuffer.
sb.insert(0,word)
Finally the stringbuffer would have the reversed string.
But this does not satisfy the constant extra space condition as the size of stringbuffer is still dependant on string size.
Please write your inputs on this| Report Duplicate | Flag | PURGE
Java - 0of 0 votes
AnswersWrite a thread safe singleton class
- Anonymous November 28, 2009| Report Duplicate | Flag | PURGE
Research In Motion Software Engineer / Developer Java - 0of 0 votes
AnswersWhat is the importance of the keyword static in java
- Divya October 31, 2009| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Java - 0of 0 votes
AnswersWrite a program to replace string 'us' with 'them' from the following String . Do not replace 'Us' as well as any string containing us
- Divya October 31, 2009
$_="Us? It usually rains when bus comes to us";| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Java - 0of 0 votes
AnswersWhat is reflection
- Divya October 31, 2009| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Java - 0of 0 votes
AnswersWrite a Java program that prints the size of a non-primitive Java object.
- Anonymous August 08, 2009| Report Duplicate | Flag | PURGE
Oracle Web Developer Java - 0of 0 votes
Answersimplement a counting semaphore in Java.
- maverick May 06, 2009| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Java - 0of 0 votes
AnswersWhat are the advantages of using spring?
- ThatDude April 20, 2009| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersWhat are the advantages of Java over c++ and vice versa
- nimmo February 03, 2009| Report Duplicate | Flag | PURGE
Java - 0of 0 votes
AnswersWhat is multiple inheritance?Why does Java not have it?How can we implement it in Java
- Nimmo January 30, 2009| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswerWhat is JIT?
- Nimmo January 30, 2009| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswersWhy does java allow only one public class in one .java file?
- Nimmo January 29, 2009| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswersWhat is the difference betn hashmap and hashset?
- Nimmoj January 29, 2009| Report Duplicate | Flag | PURGE
Java - 0of 0 votes
AnswersCan we call non static function from within static function?
- Anonymous January 29, 2009| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswersString a="abhay"
- Anonymous January 29, 2009
String b="deol"
System.out.println(a+b);
======================
String a=new String("abhay");
String b=new String ("deol");
System.out.println(a+b);
========================
Which is more efficient? why?| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 0of 0 votes
AnswersDifference betn abstract class and interface
- Anonymous January 29, 2009| Report Duplicate | Flag | PURGE
Software Engineer / Developer Java - 1of 0 votes
AnswersQuestion about java Generics. What it is? Functions and Generics questions. Best if you study it well.
- Zefram Cochrane November 22, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java - 0of 0 votes
AnswersExplain how memory leaks occur in java. How would you check for them?
- Anonymous November 11, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java - 0of 0 votes
AnswersWhat is the default visibility of an instance variable in java? What is package visibility?
- offerfromMS October 21, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java - 0of 0 votes
AnswersWhat is final, finalize and finally? Where do you use 'final' keyword. What is the effect of making a method final?
- offerfromMS October 21, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java