| Other Core Java Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| Is it possible to write JAVA program without including any
of the packages,such as "import java.io.*";
bcoz I instantly wrote a code without "import..." statement
and runned the program on command Line & it worked.
the code is:
class Person
{
String name;
int age;
Person(String s,int a)
{
name = s;
age = a;
}
accept()
{
System.out.println(name+"Hi!!!!!");
System.out.println(age);
}
}
class Demo
{
public static void main(Strings args[])throws
IOException
{
String name = args[0];
int age = Integer.parseInt(args[1]);
Person p = new Person(name,age);
p.accept();
}
} |
| 3 |
| what should do when using multiple catch() block & what should
never do for the same? |
| 1 |
| what is difference between signed & unsigned char? |
| 2 |
| How 'java' got its name and what it stands for? |
Wipro | 10 |
| what is the purpose of method overriding in java where v r
completely re-defining a inherited method instead y can't v
create a new method and define.If the question is very silly
plz excuse me and do reply.Thank U! |
emc2 | 7 |
| What are inner and anonymous class? |
| 2 |
| String is an immutable object.
Then how can the following code be justified.
String s1 = ?ABC?;
String s1 = s1+?XYZ?;
s.o.p(s1);
The output is ABCXYZ, which is the value of s1 ?
|
Flextronics | 6 |
| hoe can u call a constructor of a private classs to other
inherited claa?? |
| 1 |
| class A
{
private int i;
}
class B extends A
{
private int i;
}
if I create an object of B class what will be the memory of that object.
|
Yamaha | 2 |
| what are the uses of Class class and what it returns?
explain it with the example code. |
| 1 |
| What are wrapper classes? |
Noah-Solutions | 11 |
| What is run-time class and system class? what is their
purpose? |
| 1 |
| |
| For more Core Java Interview Questions Click Here |