100% found this document useful (1 vote)
1K views

Java Handwritten Notes

complete java handwritten notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (1 vote)
1K views

Java Handwritten Notes

complete java handwritten notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 27
papergrid Date:2!/01/20 Tava is a high level pnognamming lanquage Nognamming language 15 a medium to totenact with slo Higblevel language is a language tna _nonmal English ike Haman undenstandable Jonm lames Gosling was a penson who tatnoduced Java The company which Slanted java ts SueMicnos/e (syste) Cumnently Tava ig owned by onacle, i Wonking of a Java Pnognam/ How %5 java plat{onm independ nt / Wora lattormindependenl J" pte i w goto fe Miodlocos) Tayo. pnognam)|javalilenarnes “ByteCode ‘d on . Compile or le doleamediate Moc Sounce code Editons Ennon code gz, | Unt Report q | our Codetsunotes + Java vintual Merchine (Plalfonm dependent 3 lintte Once Run Any blhene pebu tecode 15 co intenmediats Which 15 acithen low - Level nos highlevel Language So t uses jvm—>( (onvent to machin @) Execute lineby lie Frivetty we butld the jova program using edith £ with the extension -java K an @codeesenotes Datatypes anc used to indicate on specify the type a] dota Sloned foto a vaniables Datatypes ane cateqonized Tato 2 ) primitive Datatype 2Nonpnimitive Datatype Tn ondento stone non decimal numenic values we have the lollowing datatypes The diffenence belewcen those datatypes 15 Memory size pate Memory Size +4upes Bytes} Bits byte 1 g Shost ri 16 fe] u 32 loog B | éu Zn onden to Stone decimal numenic values_we haue the lotllowing datatypes Dalat | Memorysize loct 4 [382 doubie 3 [6a aly used and! delault datatype fom dectenall. Tp onden 40 Stone tnue /Jalse we have fotlowia data pata-T| Memory size | __ | Butes | Bits Boolean} 1 8 ¢ & Stagle chance Note |] Pu the above mentioned 8 data types ane logeher called aS primitive dato types a String | Tl 1s o dataShi type to stone a Sequence of llc aneicten eS ___ullsining data has to be enclosed ewithta “double quotes” Tava ts Case Sensitive Whence fo lowene [oot equivalent 10 uppen case Letters | ee || Syntax? a Neddtaty pe. ve a | oe Loh ae - double Sclany; | ee @codees_notes ih ___ Vaniable doitialisalton . —._llLet be a VaniableName = Values _ SSS age= 20 ae 20 Age ne ssi Salary- sv00-6¢ | §000.64 i f Salary Syntax xaltialvalron ss =e = Value + Declanation © boolean xz twe; Lal Pou Se it game {C1 18¢, = | Sling Subject > “Javo"s 2 “(jsp2020' chan gender = «Mm! cass ql D||Matn encthod _ B)|| Print Statement bs @ codees_notes I@ cass Class className § public static void main (String id ergs) Pe . of Scop: £ a - : Class tT Systen-oul-pprtotln (---- 5 rtd, foe! The Jilename Should be Same aS classname duning {ile a x4} Class Firstpnogncmn _ ay Public Static void main (String r) engs)) Sie System: out-pnintin (‘Helto word" )- 4 y y @codees_ notes Oulpuls = Open cml cd_destop i cdi change cd java programs } directory favere Fixs! pnogyorm java -fompito) 40 Senter to java trsipnograre floferprarg PP Seve Wet f i ——Hetto world | 1 pie ot : Addition =: Substnacion rh *_: Muttiplication adivisi, Ti eg Diviston 2) 40 fe 3 Modulus He 05 meciutig fx. to/2=5 loe/-220 Icommple : Class AnithmeticOpenators i public stalie void mato (Stxingt3 ovgs) § fol sum= X4y 5 fot diff = a-y 5 Sy Steoi- ocd pnintin ( “Sum: “toum): System -oufl-pnrotin (" Dyfemenceits 4 diff) Syoteen + out pnintin (yxs)s Systems Cubs pnintio (30/3); System: Out:pnintin (30+/.3); i a Output - a Sum 230 _ ene ei=6) w1 thi @=5>5 QazatHo oy at=lo a=i5 int x230 @codees_notes -2 20 [2d] ee Lol * X= 30-20 X=10 Closs Assignment Openciton 3 Public stalic Void moin (String I args) aS Tot X210 5 System -oul -pniotio (‘value of x i943” +1) At+=20- System: out: Seratt s lop votguse St [| susiem out: println (= Patonarne > cmc) = Assigning = Comparsion papergrid Date: / afpal Pe) Vatue of x is 10 —_* value 0, xis 30 Eas ihroias 2] a5 6 fvatuc oy @ 1s 30 1 Les8en thon on equal + t Great thanon equalto __ = _1_Equals to 1 not equal to 2 Lint x210; __int_Y=20; __boolean nesutt > 124 boolean nesult? = yous, . [system out: prt atin (nesulth + “\t" 4 nesult a’ Isystem soul: pniatin (" 4 ___[eystem out priotin (1 Zea dal |Systern-outepntntin (3>=4)+ System: out-printin ("~~ -- |Syslen Outs pnintin (42 = 10) < ygtem + Oud pniot in (yee 0) Isystem «out: print in (cee stem Dutepsiatin CK1='0); " Stn Sai eran een [a ie — it (a 42b) a 2 system oul: pnintlo (ca ‘5 less than ov equal to" }b): : System out: pniatin (“end”), i | @codees_notes [ry else to a decision making Statement blhere tn ty the condition 6 dmue we execute tf block . Ofhen wee if the Condittonis false we execute else block - | {tow chort Syntar (Start ) 'f (condition) i $ Statement 1, 7 Sd of = a (onditio: 2 et 2 / = Statement 04 f 4 else P| meaty a Gea lc i ee ee SS oT A a a

You might also like