A is correct, but also C.
While C is not having the 'correct' static void main method, but the syntax itself is correct - which is asked.
The question itself leads to answer A and C
It has to be "static" otherwise it is treated as a normal method of the class, not a method for running the class.
So, needs to be - public static void main (String[] args){}
The correct answer A
public class Boot {
public static void main(String[] args) {
System.out.println("I float.");
}
}
upvoted 4 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
JoseCG
Highly Voted 3 years, 7 months agodya45792
Highly Voted 3 years, 5 months agoWeeChungus
Most Recent 2 weeks, 3 days agoVicky_65
2 months, 1 week agoCreazyyyyGirl
3 months agocarloswork
7 months, 3 weeks agoshivkumarx
9 months agoprabhatrai17
1 year, 1 month agoAnupam_Anand
1 year, 4 months agocarloswork
7 months, 3 weeks agoabhi7597
1 year, 8 months agoHarid
2 years, 9 months agoandreolo
2 years, 10 months agokrzysiekprzybylak
2 years, 4 months agobrianhuang881215
1 year, 9 months agoSamAru
2 years, 11 months agoZafar_Nasim
3 years agolevilevi
2 years, 10 months agov323rs
3 years, 5 months ago