can somebody tell me the line:
public static void main(String[] args) {}
especially the highlighted ones in detail.
why do we need to use static? public?
Arthas
0
Light Poster
Recommended Answers
Jump to Postpublic is so any class can use it.
static is so you don't have to instantiate the class before calling that method.
All 3 Replies
cale.macdonald
4
Junior Poster
mytime19
0
Junior Poster in Training
BestJewSinceJC
700
Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.