You are on page 1of 23
* Sova yun Pree Platforms Plat Porras elicit he Java is ayaiblle Por most OPerating Sastens - 40 a SVM 5 Java virtual tac Machine: a auto fba)\ Vel > aut = a zi a a _ a BeOS Yong. in alge ereat Operaging—systems -— ft | -+— Source Code Java + a — compiler Buje cacle ms ; i a | i. : vi b. = Dats) - Code * int micclatemeede exated boy € + Statements that ae created ey __ Progerame; witha text editor ov Visual —___ Programing teo| and then sowed ino File —— O- Syntax BL Prog ya sove'ves Nonquages @ cules ee D) Keyword S Prog taramings a Process fo solving a Prablem.— ® re rite algovithinn Anal4sis Poy Problem _CInpops » process > Ovk eve: ‘StePs a 2 taht po sey, of seQuence Sera thas dese rifoe how 0 — e es solve Prololem BEN Sprolement, to R103, 10100, _ La Buse begin with lettey ov Underscore -)) av doliar sign [ ¢> == ae ®B) does nor beain with digit. _ SB) can't, be used any Keywords (class? tatic Void ints doubles Ploat s boolean, fors while.) ©) does nok contain sPace - aa 7 -Nery_ImPortent_A/ore : ae a > _J9We_is_Cose sensitive (lower Case is depfevent i @ sthivd x begin @ Family name X contain sace Dose week __ aaa D low Qu aoe Ose aaa « 7 dea in Program Stove = ____ _— wx ewe eewerxre ie Ne F < ae UUECULTELEI Git igdet e——__Nawne 0 Re Yau joole * Data tyPes_ fia ova + ae a Prrimipive ___olota _ty pe — Be totegval __ Floating - Point a ’ Bee Clio tye __data type, data uyPe ___ Cinteger numloer ) s ——_____—— - - bie Baise | @ Pleat, | 4 loyees @ dodee ~ by dealt = all Floating - Point data tybe. Considerd a5_clouk — > data type ae Mt Mame, 3 olosble nay = Cher chi 4 aie Sees ‘ia > Steve deta in voriables % _ Deed expression fn Save + = = Arthmat ico! OPerator E VA ddibion i, ‘ : Ys @sdovaction — eh SSS ES Ne MS TS SNS 2 1 8 meeeeON Rel LN Order of Precedence 4 @ CQ Breckets ae J1/% a declaration and initialization of vavialole in — seme line —suntax: ____ = Lolain types = Value 5 Bee int X= 3; eae ASefaated- by a Beskore ment He Out Out for the Following Sova —_ Print lin Crome) 5 Krintin CV 3 a Qatwhat is the ourPor ? 0 Brut \o (n-m +b /2)4 Bet Print tn Cy OE, — aul Seueeelua vw out Princ ln ( ~ Aben Ds a pe [Prompt bs user | Curite by user >I 1 a a ze = ~ co metinods {yn | ian. eartefL Canney Class SS ea Package lech ; > nn dmmPort java.util. Scanners = a > WY v WV } Public static Void main CSering args £1) aa alee 7 ey 1 . S : e put ) Se sae > (variable) wate a oe - — a f a Class Sconney Methods % y 9 | @ Toformertint©)s // Use to inpur integers Valven , Dovble ()5 //use to inpos Dovlole values — ? KE loat (}3 //use to inpet Fleet Valves _ 2 15 /luse to net Boolean Values ae Hawn Progen that tee integer numloers 5 then Pend and print the summation number P @ Imprement Loy Proaram a Clog; Z UELULUELELLELELEGY Import Pebiic class te _Palblic Static yoid main Cstving args EL) L _Stanner Pu , _ Sy stem-our- Printlin (" (ead two nembbers “> 5, int of = inPot-nextine 65 int 02 Zinpot. next Tn > : int som= o4 +095 al _ System out. pringin(™ kre summation (32 + (sud), =< aa at Pa 40929932347 _ a 4 4 a a fia 8040 > (7 =e ale a ___ Cas C PE anne G =New Scanner (Sustern-in ) —__ System -out. Prfatln C Feces qk. ____doslole 31 = SC .next Doble ()5 = ____olouble 92 = SC. next ovble C25 = ___devble 93 = Sc-next Double (25 __ a __dovble 94 = Sc.next Doublecd3. dovlie avg = (94 +92 +93 +94) As _ oe a re ries System. out - Println ( "the ovewge fs = “+ av); rE a the — Qe iwrite Joya Prageare ‘iat Sache _ equation. eae BS Sa Y Proass s 2 = Gx 4X+X+2)/C ys) —__Selutien : © Analysis = As Oueti ® Beaeriih on: = = be - Z =CK+xax +d) Ha | / Print Z / = wi na iim port Jove. util « Scanners Public class lecs { _Peblic staste void main (string agset) { —S ok. PUY ~ 29 ee _Systemeour-Printin ("Enter value Por XS int X= inpur.mext Int C3 __ System .our-Printin(" Enter value fr ¥" 3, Jint_Y = input next Int) double Z = (x*X*% 18) (Cys 5 a S wD py wy wy =~ Wy nw Lg ae} Lo — a) —_ ~ - © Systeme ou =P mae y= eee A = in) SS » » » ~ ea) ~ ~ ww ~ ~ capo i: ® Priest name Csexing) a Opirst Character fomi\y name Cebex) Dees a PFELELELLECEL ELIS “System. out. Prineln (" Enter ome f String, Name = input. nex) ae a ae — = —_ System-out- PrinblinC Enier gow Pirst Character = 4" of Family Dome Se “Char Xx. a= . ot. NexbCD- CharAtC) = Enter your GPA )s_ EDINA = inik-nexrDableOs System-out -Prinvin (name +"-"4x+"—" + Gy

You might also like