You are on page 1of 6
retValue) HongValuc) object e values are equal. Returns jue. Returns a positive value if the invoking object has a greater value. _ : Compares the values of aumi and num2. Returns 0if atic int compare(int | the values are equal. Returns a negative value if num! uml, int num2) is less than num2, Returns a positive value if num! is | greater than num2. = Doolean equals(Object | Returns true if the invoking Integer object is equivalent imObj) to intObj. Otherwise, it returns false. Similar Wrapper class methods are available for Float, Short, Long and Double class. VIL Resources required(Additional) Nil IX. Resources used (Additional) ae Name of Broad Specification | Quantity | Remarks (if any) No. { Resource ‘ al tr 1 wm Cove 15, | Como! (Coindeis LU uA Yes (7 | sof hoo Idk, inkeliy ( Yes X. Program Code: Teacher must assign a separate program statement to group of 3- 4 students. Waite a program to show the use of Integer Wrapper class methods public class .corapperclabaty pe = public Stabe voicl meta Cstvingl9 args) & Trdeger inbokj= new Inkeg ty Clos byle b= inlobs ebyteMalveQ) Syshem -ouliprindn ("Ln byle "+6 )) Short 52 intoby. ShorWalve C3; Syshan oor printaC'Tn shorts "4S)) double cl= intoly- double Valoe (2) System. out Prjata C'Tn clovble= “dd, Maharashtra State Board of Technical Education Ti © scanned with OKEN Scanner nonin (224112) XI. Result (Output of Code): Th. dyleete. En... Ports Co, Tan... dowble $10.0... fn longs Lo. y XU en are few sample questions for reference. Teacher must design jons so as to ensure the achievement of identified CO. i ent ways to create ébject of the any primitive datatype. Write methods of Number class to convert object into primitive datatypes. List all Wrapper classes in Java. (Space for answer) a) Unboxing. Q:23..O.lote. Lot velvet... EBL Gag. longvValue. ®)... Float... PlookMalveC2. @). clowdle=..clableValuc.c... 6s.Rowble. oo Fn. Chvorenc.ltoc. ni a 2». Boolecaa. a Fechnical Education rand of Techni oy

You might also like