Skip to content

sumanthn2006/oopsjava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java Basics

Java is an Object-Oriented Programming Language.

Features of Java:

  • Platform Independent
  • Secure
  • Robust
  • Portable
  • Multithreaded

Java Components:

  • JDK – Java Development Kit (includes compiler + libraries)
  • JRE – Java Runtime Environment
  • JVM – Java Virtual Machine

DATA TYPES & VARIABLES

Type Example Size
byte 127 1 byte
short 32000 2 bytes
int 10 4 bytes
long 9999999L 8 bytes
float 3.14f 4 bytes
double 3.14159 8 bytes
char 'A' 2 bytes
boolean true/false 1 bit

OPERATORS

Category Operators
Arithmetic +   -   *   /   %
Relational <   >   <=   >=   ==   !=
Logical &&   ||   !
Assignment =   +=   -=   *=   /=
Increment/Decrement ++   --
Ternary (condition) ? value1 : value2

OOP'S CORE CONCEPT

Concept Meaning Example
class Blue print class Student{}
Object Real instance Student s1=new Student();
Encapsulation Binding data + method private fields+public getter sheter method
Abstraction Hiding details use abstract class/interface
inheritance reause code from parent class dog extend Animal
polymorphism same method diffrent use Method overloading and overriding
this Refers to curent object this.datatype

COLLECTION FRAMEWORK

Interface Class Examples
List ArrayList, LinkedList
Set HashSet, TreeSet
Map HashMap, TreeMap

About

3rdsem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages