hemamalini s.

Greenhorn
+ Follow
since Oct 17, 2005
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 hemamalini s.

I am agree with Bates.My 'belief' is as firm as HF's obnoxious girl's 'suspect'.So everyone just concentrate on HF which is more than sufficient.
Thanx
I want to ask whether Head First Java is same as K&B book for certification for SCJP.I mean whether Head First Java is meant for SCJP?
\Thanx
18 years ago
hello everybody please help me out urgently!
I have just now downloaded tomcat i mean in download page of tomcat i have downloaded all the .zip files.Now on unzipping it is showing hundreds of files .I want to ask what files are useful and how to install tomcat on my system windowsXP?
18 years ago
I want ot ask String objects are always allocated memory .So how string pool are allocated memory at compile time itself?
18 years ago
Hello javaranchers i am having these two basic doubts please solve them.

1).why a toplevel class can't be declared as protected yet it may have package(default) accessibility?
2).Why main method must be pubic to start execution while class containing it may not be public?

Thanx
18 years ago
static classes,interfaces,variables and methods are top-level element.They can be nested within static construct or top level classes only
Thanx
public class Test6 implements I{
int k = 1;
public static void main(String args[]){
System.out.println(k);
}
}
interface I{
int k = 0;
}
What will be the output?
A1) 0
A2)1
A3)null
A4)Compiler Error
#####################################333
the answer is [4]
How?
Thanx everybody i got it
jvm is outside the class . it can call public main() method.it is right.but what if class is in default access and public main is there.then also it is able to call it.
I just want to ask how JVM enters a non-public class?
Why main() method must be public so that it be called from JVM?
why class name may not be public in which main method is there cause ?JVM is outside the class>...........
Q14 public class Test14{
static String s ="Instance";
public static void method(String s){
s+="Add";
}
public static void main(String a[]){
Test14 t = new Test14();
s = "New Instance";
String s = "Local";
method(s);
System.out.println(s);
System.out.println(t.s);
}
}
What is output?
output is locan new instance.
How?
Thanx
import java.util.*;
public class Test1{
public static void main(String a[]){
Set s = new TreeSet();
s.add(new Person(20));
s.add(new Person(10));
System.out.println(s);
}
}
class Person{
Person(int i){}
}
****************************why above code is giving ClassCastException?