Explain the reason behind ending a program with a system.exit(0)?
Answer / Ashish Mathur
System.exit(0) is used to terminate a Java program immediately and return 0 as the exit status to the operating system, indicating that the program has executed successfully. Other non-zero values can be passed to System.exit() to indicate different types of errors or failures.
| Is This Answer Correct ? | 0 Yes | 0 No |
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
Can a class declared as private be accessed outside it’s package?
diff. b/w JAVA and javascript...
Is alive method in java?
What is the properties class?
What are the 3 types of loops in java?
explain about jre and jvm
What are the different types of data structures in java?
what is the Diff. between Access Specifiers and Access Modifiers?
39 Answers BMC, Cyber Shot, Infosys, VTS, Wipro,
why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all classes na. then what is the need of importing java.awt.event.*; ?
What is java object name?
Can a static class have a constructor?