Following operators are used in java : operator usage description &&(AND) A && B Return true value when A,B are true ||(OR) A || B Return true , if one of variable is true ! (NOT) !A Return true if the value is false >(greater than) A > B Returns true, if value A is greater than B […]
if-else statement
IF-ELSE-STATEMENT is a decision maker and executes an instruction having a true or false statement. The main Syntax is: IF (CONDITION) STATEMENT [ELSE STATEMENT2] // optional option is in square brackets Example: public static void Main(String[] args){ int age = 18; if(age>=18){ System.out.println(“Right You are allowed to drink alcohol”); } else{ System.out.println(“NO you are not allowed to drink […]
First Java Program
First Programm Hello World: Step 1: Download eclipse from https://www.eclipse.org/downloads/packages/ You need only 1 Version of eclipse JAVA or C++. Step 2: Download new java JDK https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Remember your installation Path of JDK Step 3: SET Environment Variables click on Start -> Control Panel/Properties -> System – > Advanced System Settings > Environment Variables > Path > click […]