The rest of the cases are not considered further, and the program breaks out of the loop. Test the condition if a particular case is true, the control is passed to that block and executed. Tests condition, if condition true if block is executed else the else block is executed. return value (only if type is not void)Ĭonditional Statements in Java 1. Return - statement to return value to calling routine type name (parameter list) Parameter list - sequence of type and variables separated by a comma Where type - the return type of the method Used to refer to the current object in a method or constructor. Used to indicate that a variable or a method is a class method. Used to execute code after the try-catch structure. Used to catch exceptions generated by try statements. Read here: Major features of Java programming Primitive Data Types in Java Java was modeled in its final form, keeping into consideration the primary objective of having the following features Memory Management: Garbage collected language, i.e., deallocation of memory.Įxception Handling: Catches a series of errors or abnormality, thus eliminating any risk of crashing the system. The only requirement is Java needs a runtime environment, i.e., JRE, which is a set of tools used for developing Java applications. Thus, byte code is platform-independent and can run on multiple systems. This is because Java code is compiled by the compiler and converted into byte code. Platform-neutral: Java code is independent of any particular hardware or software. Open Source: Readily available for development. Object-Oriented Programming Language: based on the concepts of “objects”. Simran Kaur Arora | 13 Dec, 2022 Java Cheat Sheet: Download PDF for Quick Reference
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |