main() method in java - pre defined or user defined?

  • #1

Summary:

should main() method in java be considered pre defined method or user defined?
although we cannot change the syntax of the main() method but programmer does create main() everytime in the program.so i want to ask if it should be pre defined method.
 

Answers and Replies

  • #2
34,160
5,778
Summary:: should main() method in java be considered pre defined method or user defined?

although we cannot change the syntax of the main() method but programmer does create main() everytime in the program.so i want to ask if it should be pre defined method.
The Java main() method is defined by the user, but its signature (i.e., its argument and return type) have to follow a set pattern.
 
  • #3
The Java main() method is defined by the user, but its signature (i.e., its argument and return type) have to follow a set pattern.
So should it be pre defined?
 
  • #4
34,160
5,778
So should it be pre defined?
The body of the main() method is not predefined -- it has to be written by the programmer for each program.
 
  • #5
ok got it now
 

Related Threads on main() method in java - pre defined or user defined?

  • Last Post
Replies
7
Views
1K
Replies
1
Views
633
Replies
4
Views
1K
Replies
3
Views
4K
  • Last Post
Replies
1
Views
2K
Replies
1
Views
3K
Replies
1
Views
2K
Replies
2
Views
2K
Top