Posts

chapter 1- variables and datatypes

 Just like we have some rules that we follow to speak English(grammar), we have some rules to follow while writing a java program. The set of these rules is called syntax( vocabulary and grammar of java ).  Variables  The variable is a container that stores a value. This value can be changed during the execution of the program. Example: int number = 8; here, int is a data type , the number is the variable name and 8 is the value it stores  Rules for declaring a variable name we can choose a name by declaring a java variable if the following rules are followed: 1. Must not begin with a number  ==>int 1arry; is invalid! 2. Name is case sensitive  ==>dhruv and Dhruv are different! 3. Should not be a keyword( like void). 4. white space is not allowed. ==>int developer dhruv is invalid. 5. Can contain alphabets, $ character _ character, and digits if the other conditions are met. Data types Data types in java fall under the following categories. 1.Pr...

Introduction to Java

Java is an object-oriented programming language developed by Sum Microsystems in1991. It was originally called oak  by James Goslin(one of the inventors of Java. JAVA = purely object-oriented -------------------------------------------------------------------------------------------------------------------------------- How java works Java is compiled into bytecode and then it is interpreted into machine code. source code compiled bytecode interpreted to   machine code for given to the machine. ----------------------------------------------------------------------------------------------------------------------------- Java installation go to google and type "install JDK"  >>  install Java JDK go to google and type "install IntelliJ idea" >> install Java IDE (community version)   JDK >> java development kit =collection of tools used in developing and running java programs JRE  >>java runtime environment =helps in executing programs...