Rajith Vidanaarachchi

Greenhorn
+ Follow
since Nov 06, 2004
Merit badge: grant badges
For More
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 Rajith Vidanaarachchi

Wow Shency Amazing score,



Congrats for you. R
19 years ago
Congradulations Jagdish,

It is fantastic to score that high. Also thanks for saying how you did. I am going to read K&B now on.
Bye.
19 years ago
Hi Asha,

A char is 16 bit but a int is 32 bit so we can't put an int into a char. To do so we need a cast. Try doing like this
int i=5;
char c =(char)i;
19 years ago
Tormer,
For your first question the answer is YES. You can do this using J2exe. You can download it in the internet.(There is a tutorial too)To find it search in google.
Bye
19 years ago
Hello All,
My answer is Yep.
A class can extend only one class but can implement multiple interfaces. And an interface can extend multiple interfaces.
Bye.
19 years ago
Hello Yasir,
You can use the setFont() Method to do that. I haven't done that myself but one of my friends told me so. You can see the JLS or if you are using windows you can use the JDK1.5.0 Windows help. If you can't find a one you can ask me(With your e mail address).
Thanks
19 years ago
Hello,
You are asking the differences between the Thread class and the Runnable interface. Both are used to make threads. Implimenting the Runnable interface is appropiate than using the Thread class. Because we can extend another class while making a thread. But if we just extend the Thread class we can't inherit from another class. There is another difference. We can create threads easily using the Thread class than using the Runnable interface. Because we can just make an object from our class.But when implementing the Runnable interface we have to do a lot making thread objects giving arguments and so on. For furthur explanations see the JLS
thanks
Hello,
I previously thought that the answer was correct but now I typed it and Compiled it and got the output.You are correct!


[ December 21, 2004: Message edited by: Rajith Vidanaarachchi ]
19 years ago
Hi,
I'll post a simple and easy example for your question.
Do you know that the class Exception it self os an exception. That we can throw just Exception. So now you are saying that all the exceptions inherit from(are subclasses of)the class Exception. Due to my knowledge a class can't extend itself. I think you understand now.
19 years ago
Hello,
You can give a less restricted access modifier when overriding.You can prove this by writing some code.So both are correct.
I hope you'll understand.
[ December 20, 2004: Message edited by: Rajith Vidanaarachchi ]
19 years ago
Hi,
I think you asked the diference between the =(assignment operator)and the ==(boolean equality operator). = is used to say that the left most operand to get the value of the rigth most one.
eg:- int x=1;
int y=2;
int x=y;
this code makes the integer x to get the value of y.Now x is 2.
Now lets get to the ==. This is used to check the equality.For primitives it checks the value. For object references it checks the referenced object.
eg:- int x=1;
int y=1;
if(x==y)
System.out.print("x and y are equal");

//here it prints "x and y are equal"

I think you can understand this explanation of mine.
Thanks.

[ December 19, 2004: Message edited by: Rajith Vidanaarachchi ]
19 years ago