Win a copy of Terraform in Action this week in the Cloud forum!

subash chandar

Greenhorn
+ Follow
since Feb 07, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by subash chandar

How to create a word document by fetching files from the database without using EditorKit.
16 years ago
What is the difference between checked and unchecked exception.

How to identify whether an exception is checked or unchecked.
Is RunTimeException checked or unchecked
16 years ago
Here is the code that I tried:

int i = 10;
System.out.println(i);
i = i++;
System.out.println("i=" + i);

and i got the output as i=10

why the incremented value of i is not stored.

But if i change the stmt i=i++ to j=i++
i is incremented and the incremented value is stored in i
16 years ago
I typed the wrong stmt.

It is not
public static void main(String args[]) {
b bobject=new b();
b=new a();
System.out.println(bobject.i);
bobject.test();
}

The correct stmt is

public static void main(String args[]) {
a aobject=new a();
a=new b();
System.out.println(aobject.i);
aobject.test();
}
16 years ago
I try the follwing code

class a {
int i=10;
public void test() {
System.out.println(i);
}
}
class b extends a{
int i=20;
public void test() {
System.out.println(i);
}

public static void main(String args[]) {
b bobject=new b();
b=new a();
System.out.println(bobject.i);
bobject.test();
}
}


The output of the above method is 10 and 20

The stmt "System.out.println(bobject.i)" prints the value of i
which is declared in class a but the stmt "bobject.test()"
prints the value of i which is declared in class b.
I dont know whats the concept behind that
16 years ago
We cant declare abstract classes as strictfp
16 years ago
I have written a simple program that implements two interface that
contains same abstract methods.Does any one know which method will be overrided in the implemented class and why.

Here is my program

interface a {
void display();
}
interface b {
void display();
}

class test implements a,b {
......
public void display() { }
.......
}
16 years ago
What is dynamic method dispatching and what are the advantages and disadvantages of using this concept
16 years ago