How to call static method?
Answers were Sorted based on User's Feedback
Answer / maharajan j
Static methods we can call without class reference.We don't
need to create an object of that particular class.
For example:
class A{
static void disp(){
sysout("Java")
}
}
class B{
B(){
A.disp();
}
}
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / ranganathkini
A static method may be called in 2 ways:
1. Thru the class reference
2. Thru the instance reference of the class
Is This Answer Correct ? | 6 Yes | 2 No |
Why parsing is done?
How do you remove an element from an arraylist in java?
What is substring 1 in java?
What are the basic concepts of OOPS in java?
0 Answers Axtria, ITC Indian Tobacco Company,
What is difference between fileinputstream and filereader in java?
What is native code?
How infinite loop is declared?
What is array length in java?
Can anonymous class have constructor?
Can we override singleton class?
what is features of jdk 1.5?
2 Answers Accenture, Satyam, TCS,
Is it safe for adding 10,00,000 records/objects to HashMap?, i.e is it safe to add millions of objects to HashMap?