×
A DAY WITHOUT LEARNING IS A DAY WASTED
--Your friends at LectureNotes
Close

Core Java

by आदित्या मिश्राआदित्या मिश्रा
Type: NoteInstitute: BOARD OF TECHNICAL EDUCATION LUCKNOW Offline Downloads: 71Views: 3139Uploaded: 3 months ago

Share it with your friends

Suggested Materials

Leave your Comments

Contributors

आदित्या मिश्रा
आदित्या मिश्रा
2018 CORE JAVA JAVA STUDY MATERIALS JAVA FOR BEGINNERS ALL ROUND DEVELOPMENT FOR THE STUDENTS WHO WANTED TO LEARN JAVA FROM STARTING. ADITYA MISHRA ALL ROUNDER JAVA.ORG 20-Aug-18
CORE JAVA JAVA is an object oriented programming language primarily by JAMES GOSLING and colleageous at SUN MICRO SYSTEM.The language was intially called ook.JAVA is both compiled and interpreted. FEATURES OF JAVA SIMPLE: Java does not support complex topic of other language. SECURE: Java program run within a JVM(java virtual machine) which protect illegal access. ROBUST(Strong): 1. Type checking mechanism. 2. Strong memory management. 3. Exception handling. 4. No pointer Support(It works on the reference). MULTITHREADED: Write something do manything.Executing multiple thread simultaneouly.We can execute various programs in one applictaion. PLATFORM INDEPENDENT: JVM MAC(OS) JVM JVM WINDOWS(OS) LINUX(OS) WINDOWS PLATFORM BYTE/MAGIC VALUE When we compile any java program it will produce byte code in one operating system this Byte code. We can be run any other operating system which has Java virtual machine(JVM). Because of byte code java is platform independent and portable also.JVM understood bytecode and produce machine code for corresponding.
WORA- Write once run anywhere. DISTRIBUTED:By using we can create Distributed application. HOW TO WRITE JAVA PROGRAM 1. 2. 3. 4. Copy path C:\Program Files (x86)\Java\jdk1.7.0_09\bin. Open run prompt[WINDOWS + R]. Type cmd and then enter. In cmd(Command prompt) type cd and paste copied path with space. EX-cd C:\Program Files (x86)\Java\jdk1.7.0_09\bin 5. Type notepad with the file name. EX- notepad First.java CODE- First program class First { Public static void main(String[] arg) { System.out.println(“MY FIRST PROGRAM”); } } HOW TO COMPILE: javac file name javac First.java HOW TO RUN: java filename java First WAP TO SHOW VARIOUS DATA TYPE class dat { public static void main(String[] arg) { byte b=100; short s=1000; int i=14524224; long l1=12578457851210l; float f1=12.25f;
double d=12.45264; char c='z'; boolean bol=true; System.out.println(b); System.out.println(s); System.out.println(i); System.out.println(l1); System.out.println(f1); System.out.println(d); System.out.println(c); System.out.println(bol); } }. TYPES OF VARIABLES A variable which is declare inside a class with static keyword known as static variable. A variable which is declare inside a class without using static keyword known as instatnce variable. A variable which declared inside the member of a class known as local variable. We cannot access instance member inside static context directly. EXAMPLE: class var { static int a=20; int b=10; public static void main(String[] arg) { int c=40; System.out.println(a);

Lecture Notes