What is the argument type of main() method?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
The argument is a String[] which contains the command line
parameters passed by the user while launching it.
| Is This Answer Correct ? | 3 Yes | 0 No |
Can you call a constructor within a constructor?
What is private protected in java?
Is java a prime method?
What is class variable java?
What is a data structure java?
Which class is the superclass for all the classes?
How to know the host from which Applet is originated?
What does opcode mean?
How to change the priority of thread or how to set priority of thread?
What is clipping and repainting and what is the relation between them?
Can a boolean be null java?
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?