Skip to main content

What Is JAVA ? Data types in java


 

JAVA

Designed by - james gosling
released  - 1995 


A java is a programming language . it is one of the most popular programming language in the world . created by james gosling at sun Microsystems. First it was named Oak then Green and finally java. currently the ownership of the programming language is with Oracle.


uses of java ?

create Desktop applications .
create mobile application . 
create web application . 
create games.
used in web and application servers.


why learn java ?


It is a fast and powerFull language . It works on many platforms like window , mac , Linux etc. Easy to learn and use .open source and free. Learning other languages will be way more easier after learning java and its OOP concept.


java first program


*Every java program is written inside a class.
*Commands start to execute from the main method in the class.



1. save the file using the same name used for the class name with extension .java.
2. Compile (This will create the java byte code file with . class extension .
3. Run the program.





using Println() Vs Print()

Println() - Adds a line break after the output.



Print() - Does not add a line break after the output.




Data types

Data are needed to be stored within a program during execution . The type of data needed to be stored should be specified before storing them .
All data type in java divided in two parts-
1) PRIMITIVE DATA TYPES
2) NON- PRIMITIVE DATA TYPES


Primitive                        Non-Primitive

byte-1                                           class  
short-2                                         object 
int-4                                              array 
float-4                                           interface
double-8                                       string
character-2
boolean-1 true/false


that's all today ...
                             see you in nest blog ...
                                                                    by by .....




here my linkedln 




Comments

Post a Comment

Popular posts from this blog

Define DBMS ? And it's applications .

  Define DBMS ? And it's applications || 2inshort Hey everyone , today we will talk about Database  management system ,this subject is very important in engineering. Define DBMS :   Data base is a collection of related data in a systematic manner. It is a system of storing and taking care of data , data can be easily accessed managed and updated. Data base can have multiple tables.Database is controlled through a software called DBMS. SO what is DBMS? -DBMS is a computer software application. -DBMS interact with user , other application and Database itself to retire and analysis the data. -accept request for data from an application and instructs OS and provide specific data. -DBMS allows users  to create their own data. example - Oracle , Microsoft , SQL ,  MySQL ,  DB2 , ORION , IMS  , Foxpro , MongoDB Applications of DBMS 1. Banking ( All transactions) :  We make thousands of transactions through banks daily and we can do this without going to ...

What Is Power Supply?

                      What Is Power Supply?  POWER SUPPLY :    A power supply unit (PSU) converts main AC (alternative current ) 110-115 or 220-230 volt to low-voltage regulated DC (direct current) power for the internal components of a computer . There are two types of power supplies existed,  AC and DC power supply . Based on the electrical device's electric specifications it may use AC power or DC power.                       ATX power supply unit The power supply is located at the back of the computer,  usually at the top. However, many more recent  tower   computer cases house the power supply at the bottom  back of the case. In a desktop computer case (all-in-one),  the power supply is located at the back left or back right. links- instagram twitter facebook

Variable , Constant , Comments in JAVA ?

java Variable -A variable can be define as a memory location that stores an data value of a certain type. -A variable consists of a data type along with a suitable name. -Assigning a value for a variable for the first time is called initializing a variable. example int age; output first we took integer the declare its value and then print the output. Constant -The difference between a constant and a variable is that the value held by a variable can be changed throughout the problem execution . but after a constant has been initialized we can not change the value in it. example final double pi 21/7   output ERROR , because we have already declared the value of PI. Comments -Comment can be used to explain written code. -This will help a person to read and understand the code in future .  -Comments are ignored by the compiler during compilation. Whatever is written inside the comments will not be printed because it is only for understanding. instagram twitter facebook