JAVA LEARNED TOPICS
BASICS:
JDK - Java Development Kit(to develop application)
JRE - Java Run Time Environment(for executing java program, provides class
library with JVM)
JVM - Java Virtual Machine(compile java code to byte code to machine code)
STEPS TO CREATE PROJECT IN ECLIPSE IDE :
STEP 1 : Create a new project
STEP 2 : Create a package
STEP 3 : Create a class with 1st capital letter
Variables :
# Local variable
# Global variable
# Static variable
Data Types with Size:
# Integer (byte - 1byte,short - 2bytes,int - 4bytes,long - 8bytes)
# Float (float - 4bytes, double - 8bytes)
# Character(2 bytes)
# Boolean(1 bit)
Operators :(important)
# Bitwise
# Left & Right shift
Loops:
# while loop
# do-while loop(Exit check loop)
# for loop
* simple for loop
* for each loop
* nested for loop
* infinite for loop
Array: (it is a collection of same data type)
Types:
1) 1D array(row or column)
2) 2D array(row and column)
Strings:
# next(),nextInt(),nextLine()
# Methods: # Keywords:
* Length ---> .length()
* Character ---> .charAt()
* Concadination ---> .concat() or '+'
* Contains ---> .contains()
* Starts with ---> .startsWith()
* Ends with ---> .endsWith()
* Equal ---> .equals()
* Not equal ---> .IgnoreCase()
* Change to upper case ---> .toUpperCase()
* Change to lower case ---> .toLowerCase()
* To find Hash code ---> .hashCode()
* Trim ---> .trim()
* Join ---> .
* Index ---> .
* Last index ---> .
* Is empty ---> .isEmpty()
* Replace ---> .replace()
OOPS(Object Oriented Programming Language):
# Object - instance of the class
# Class - collection of object
# Inheritance - is a mechanism where a new class is derived from an existing.
Types:
* Single
* Multiple
* Multilevel
* Hierarchical
* Hybrid
# Polymorphism - if single task is process by different ways.
# Data Abstraction - it hiding internal details and show only functionality.
#Encapsulation - is a process of wrapping data into a single unit.
# Interface - it is a blue print of a class.
# Constructor - is a special type of method that is used object
initialization
Types:
* Default constructor - it has no arguments
* Parameterized constructor - have any args
* Copy constructor - copy and access the args
Keywords
# Static
* static Variable
* static Method
* static Block
# This
* this(.)
* this off()
# Super
* super variable
* super method
* super constructor
# Final
* final variable
* final method
* final class
----------------------------Incomplete-----------------------
Treeset - it diplays the value in ascending order
Map:
# HashMap<>
# Linked HashMap<>
# TreeMap<>
Files:
#1 Create a folder ----->File f1=new File("Location")
#2 Create sub folder -----> mkdirs()
#3 File creation ---->file.createNewFile()
#4 File deletion ---->file.delete()
#5 File Rename ---->file.getName()
#6 Witing a File--->file.write("") & file.flush()
#7 Reading a File ---->file.read()
-------------------------------------------------------------
SQL refer-----> W3School
-------------------------------------------------------------
JDBC-Java Database Connectivity
Methods:
# init()
# service()
* doGet()
* doPost()
# destroy()