hii actully i am goin for technical interview on java as fresher so please tell me what these two basic lines means :
public static void main(String arg)
please give me meaning of each word
In public static void main(Stringargs)
public-It indicates that the main() method can be called by any object.
static-It indicates that the main() method is a class method.
void- It indicates that the main() method has no return value.
(String args)-It is used for receiving any arbitirary number of arguments and save it in the array.
System-The System class is a predefined class contains several useful class fields and methods. It manipulates various operating system related objects and provides access to the system.
out-System class has a field out of type PrintStream class that is connected to the console and allow to display something on console.
print()-It is a method in PrintStream class that displays the String which is passed to it.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.