Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

BASICS FOR FROM ZERO BEGINNER RIENDLY NOTES, Summaries of Java Programming

this notes are design for those who have just started learning java these are some basic notes you must read it before going to the next step in learning java

Typology: Summaries

2022/2023

Available from 08/14/2023

hemangi-parmar
hemangi-parmar 🇮🇳

2 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BASICS OF JAVA
Beginner friendly
Index :-
introduction to java
history of java
java version history
features of java
what is class?
what is object?
What is package?
Data types in java.
Two types of method in java
Structure of java
Variable in java
Scanner class in java
Adding to integers in java
exercise
INTRODUCTION TO JAVA
-Java is an object oriented programing language .
-but java is not fully object oriented language why?
By – Hemangi
pf3
pf4
pf5
pf8

Partial preview of the text

Download BASICS FOR FROM ZERO BEGINNER RIENDLY NOTES and more Summaries Java Programming in PDF only on Docsity!

Beginner friendly

Index :-

 introduction to java  history of java  java version history  features of java  what is class?  what is object?  What is package?  Data types in java.  Two types of method in java  Structure of java  Variable in java  Scanner class in java  Adding to integers in java  exercise INTRODUCTION TO JAVA -Java is an object oriented programing language. -but java is not fully object oriented language why?

Beginner friendly -because it consist primitive data types. -Java is a programming language and runs on various platform.

History of java :-

 Java was originally designed for interactive television, but it was too advanced technology for the digital cable television industry at the time.  It was developed by james Gosling in 1995 who was a member of a team called as Green Team from the sun microsystem.  Java was originally named as Oak but then changed because it was already trademark by another company(Oak technologies). so, they changed it to java.

Java version History :-

  • JDK Alpha and Beta (1995)
  • JDK 1.0 (23rd Jan 1996)
  • JDK 1.1 (19th Feb 1997)
  • J2SE 1.2 (8th Dec 1998)
  • J2SE 1.3 (8th May 2000)
  • J2SE 1.4 (6th Feb 2002)
  • J2SE 5.0 (30th Sep 2004)
  • Java SE 6 (11th Dec 2006)
  • Java SE 7 (28th July 2011)
  • Java SE 8 (18th March 2014)
  • Java SE 9 (21st Sep 2017)
  • Java SE 10 (20th March 2018)

FEATURES OF JAVA :-

 java syntax is based on c++.  Java is object oriented language.  It is very easy to learn, and its syntax are simple clean and easy to understand. 

Beginner friendly Object is an instance of the class. What is package? Package is collection of classes. Which can be import in the program. DATA TYPES IN JAVA :- Two types of method in java :-

  1. Static
  2. Non static Data types in java

Beginner friendly Structure of java :- Write a program to print hello world in java. public class Hello { public static void main (String args[]) { System.out.println(“Hello world”); } }  System.out.print – it works like printf in c language. It basically Prints the sentence.  Static is a type of method which mean static method.  Public is an access modifier  String args[] is argument  Void it means program will written nothing  Class Hello is name of the class 

VARIABLES IN JAVA :-

 Variables are the names of the storage locations.  A declaration statement must end with a semicolon. Some valid declarations are: int count; float x, y; double pi;

Beginner friendly Output:- 30 By taking input from user Import java.util.*; public class sum { Public static void main(String args[]) { Scanner k=new Scanner(System.in) Int a,b; System.out.println(“enter the value of a : ”); a=k.nextInt(); System.out.println(“enter the value of b : ”); b=k.nextInt(); int sum=a+b; System.out.println(“the sum of the element is : ”+sum); } } Output:- Enter the value of a: 10 Enter the value of b: 20 The sum of the element is : 30 #DO IT YOURSELF  subtraction of two integer

Beginner friendly  division of two integer  multiplication of two integer  find average of 3 integer -also practice with scanner class by taking input from user Hope it helps