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

  • Context: Java 
  • Thread starter Thread starter anyonebutangel
  • Start date Start date
  • Tags Tags
    Java Method
Click For Summary

Discussion Overview

The discussion centers around whether the main() method in Java should be classified as a pre-defined method or a user-defined method. It explores the nature of the main() method, its syntax, and the requirements for its implementation in Java programs.

Discussion Character

  • Conceptual clarification, Debate/contested

Main Points Raised

  • Some participants assert that while the main() method is created by the programmer, its syntax must adhere to a specific pattern, raising the question of its classification.
  • Others argue that the main() method is user-defined since the body of the method must be written by the programmer for each program.
  • A participant questions whether the main() method should be considered pre-defined given that its signature is fixed but its implementation varies.

Areas of Agreement / Disagreement

Participants express differing views on the classification of the main() method, with no consensus reached on whether it should be considered pre-defined or user-defined.

Contextual Notes

The discussion does not resolve the implications of the fixed signature versus the customizable body of the main() method, leaving the classification open to interpretation.

anyonebutangel
Messages
40
Reaction score
5
TL;DR
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.
 
Technology news on Phys.org
anyonebutangel said:
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.
 
Mark44 said:
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?
 
anyonebutangel said:
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.
 
ok got it now
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
7K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
3
Views
4K
Replies
3
Views
3K