Posts

What is Java ?

Image
Introduction to java : Java is a programming language and computing platform first released by Sun Microsystems in 1995.    It is intended to let application developers  “write once, run anywhere” (WORA) , meaning that compiled Java code can run on all platforms that support Java without the need for recompilation. It is used for: Mobile applications (specially Android apps) Desktop applications Web applications Web servers and application servers Games Database connection And much, much more!

Data Types In Java

Image
Data types A data type is nothing but simply it’s a type of data . That means data type is a data storage format that can contain a specific type or range of values. We are also known that , Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory. Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory. Whenever we store some value in variable , then the one which defines the type of that variable is called the data type. Data type defines the size and value a variable can hold. There are two types of data type in java Primitive data Non primitive data type Primitive data types are predefined types of data, which are supported by the programming language. For example, integer, character, and string are all primitive data types.      There are 8 primitive types: byte, short, int, long, char, fl

Types of variables in java

Image
Types of Variables in Java There are three types of variables in Java    Local variable  Static (or class) variable Instance variable Local variable : These are also called as stack variable. Because they exist in stack memory variable declared inside the body of the method is called local variable. You can use this variable only within that method and the other methods in the class aren't even aware that the variable exists. local variable cannot be defined with " static " keyword. Instance variable: Instance variable are also known as member variable or field A variable declared inside the class but outside the body of the method, is called instance variable. It is not declared as static. Class Variable/Static Variable: • These are loaded and initialized when class is loaded in JVM • There exists only one copy of class variable

Variables in Java

Image
Variables in Java ? Variables are the  basic requirements  in any program be it Java,Python or  JavaScript .It is the basic unit of storage. It acts as a container and is used to hold data values. The values held by the variable can be changed during the execution of the program. Every variable is assigned a data type. Variable, in simpler terms, is a name given to a memory location.  Variable Declaration and Initialization           A variable is declared by specifying the following parameters: ·         Datatype:  The type of data that is stored in the variable. ·         Variable name:  The unique name given to the variable. ·         Value:  The initial value stored in the variable.   Variables naming convention in java      Variables naming cannot contain white spaces,   for example: int num ber = 100; is invalid because the variable name has space in it.      Variable name can begin with special characters such as $ and _  

Java popularity

Image
Java’s Popularity and High Salary : Java is one of the most popular languages in the world. It is used by some 9 million developers and it runs on around 7 billion devices worldwide .                    Java is Platform Independent. Java is a high level, robust, secured and object-oriented programming language. Java is used for developing web applications and games.       Java has a massive environment and class library Java is modular, flexible, and extensible Java is free and open-source Java supports Legacy Platforms Java has performance at scale Java is extremely reliable