You are on page 1of 10
Ts _ded auld : Tnitializafion of a __sdntie vai able value is__dependon Pox vasiable . is_null is_null ete shed il tox int tb tx of Waapped Vaxtable thro 3h an ‘obiect, a static vani'al he compiler till __chow a _wstant wich toon nll the pagan 10 comical J acces a. name + _SJatic vaatables cannot : Sakic vasiablec impos javasin.™ } bln ck can be publi Shi public _sdodie void ob ct __jname clade the compiler wil) suctomatically append Ahe with the cla Narre without the ela axtahle locally in ide Jae : Leclaned used tp he md || aT na | | initial! Y in (Sdaing C in ing CJ _ asa) —Syplerne oud printlin C"(netk ane is 2" + Ceorgees)y wy) Oude a Name is ! \ bts Shu bhan “Torin = Lach object us have ike nian co dariables py af an inztam oxia ble 2 v ne Antic variable pee clo Thus totic vaxiables on dee memory management De cant nae anal due xedenene ond __etatic vaxiahles ran be accessed desc ly a ng dhe cla nam fe ates pre Class Waa ppe classe axe___the pres dedined lasces . 5: . . - eal e. “The t purpace of Waa ppor class ae Wasppes classes in “Tiva ane used sin changing she value in —macthed ,sSevializadinn , —cynchaontzadion ok he eight: classes of dhe java slow ase known 0, wx a ppex classes _in “ava Praciton’ tive. Tyee Wsappex Cla boolean Boolenn chore Chas acker B showt how nt egan Lona, y Hoot Flea double Double sate agate ee public 0 ople1_t “public stake vid main (Sting ang, (1) p __int_a = 20; Theos i se i ys Keun: oud. println (oe pe ey \" 4 Qukpe Qo 20 2 Dhteger . yalue Of (a) : a | Arson An —sasoy is aT collection nfl siimilex dade hyp lements © ishich hos —combiguns —memon; toca” fox—example —if_sne ant “to che 7 fe nama of oo o rig ‘pe thot can hse lon homes oe These axe - of pasoy Single — dimensional Array 7 2 Malti — dimensional are] _tubscript: Element axe Adnued lineaaly and can be accessed ena Yeclaxat'on [ suse “hh Genes foam of —declenadion of [=D ate dedalype ci fesuyha nt ale ge Hexe aba dupe is_she spe of lement that esi] Only the _leclaxadion® of dhe arsoy is not suffe Th is initialize it: afdos ~daclasadion = The untay sf initializing an anna ja 4 ' Ty a: 2 irae | ich dae ox © follows tia ()_Ldpthouwt Assigning Values Tn this way, ure pag wrere Ah —Ahe si | the —ole fou 7 value of each element nitted in abray is 0.—— Tn_dthis_way, ie" declawe amd iniftalize the” assay sogcthes Wedel “These ie nn need Laamle public class AL 3 “ed public state vaid rosin (String gage C3) 5 ae ind} wombens = 2.22, 33,456,465 —_ gfelinkts Oo ic Site) cet r Duele 2232 uy Sf 4 Accessing _Arvay —in_ava otk, the ADhO ; & created you Can acless an pict eomnent bu used the ame of the ty m_—nlex teased —bebaeena—paix_of Chegutnce — baackek . “The 1} bx. subscript of an oarsy_indicade Index the position of a element inthe assay The. ip - assay Refvar Tindex 1 ci JL prdln (nemes (61); Spb Crema ort vas (2 Susterns vai nit Lin no! Systems souk, print hn (name £33); aE _ Muli dimensional Atay 3 Dn Tava, a _mulhidimSasional awsay pe nothing fut an anna of Aas Each clemem$at of a mnletidr= =mens jo! ia__an i itself. ‘act! ed ic _used feo reeal maateices ar values’ oth rows 200. columns es . wactfo Lindex 2) — — Thibtalizaton of aro fey — a aa Datatype [= Dimensi =a nd Dimension) —=— ] iy Dimensign™ a assoymeme = new Datatype (lonath 1] Clans th 27 - eS egies S engl 2) Here, clataly pe is the iyp of data 4o be shoved i x 2-D dap Wp aa isthe sete homo yer do aed Jenath is the ot of the asedy © espe chtve® dimension te ey aes elements only 2- subscaipt axation — the to quawe _byackels can be written afte, either datatype ex_008a name —_ Sasyotat < spotatype CIC] _arnoipronse a oR Dadalyoe assoyparne CIC] int Wolizatton = pe Elgg) srs ayname = nese Dada eis Vai dle nome ___gi ae ig epulaftng and Joving dota Length 1 ia nes of a f 0 jn_2=D aca awd Jeng th Ya the _no. 0° columms. ' ecm len fitblic—class —ctoadimensianal _{ Pa stale void main Ching aags TI) ikon UC = f$9a,0, faut, Gau2tL, te ( link izo ts 7 ++) f tow Cid j= Q' 4 p jet) Jems “nul prindln (an Cag +“ Dy om out. paintln 1, 0 Cys Oukpud ath “cle i— Lo 5 age fetsy bp Tee ig on ansays tuch thet con be f Tad size: ives wy we 2-D fats lou with a vasiabe number ~ of tolumns in each you. 2, __ OS ips inhalation jak _omeneme [ICTS now inf CICT f now inf CI 1o,20,30, U0 4, neo int C1 f Ce ,b0,40 0, 4e,1oef, noo int C] f to, 204 $4 ego le— class Hain § i y public static void taal J angs ring Cong int ona CIC] = nwo int (210) on Lol = new int (3) oy Ei} = how int C2): int count = 07 fo _(ink jo 1< orn deagth | iat) fons link j= ae gana fi engi 4ix) And alee oak ++) coud. println (Contents of 20 I: ay") ie oye fsalegth pie : sh ee ok 2 a4

You might also like