Drag_and_Drop_SCJP5_Ver1[1][1].0[1].pdf - SCJP 5.0 Drag Drop 1 Place code into the class so that it compiles generates the out put answer=42 Note Code

Drag_and_Drop_SCJP5_Ver1[1][1].0[1].pdf - SCJP 5.0 Drag...

This preview shows page 1 - 6 out of 36 pages.

SCJP 5.0 Ratna Prasad Page 1 of 36 Ver 1.0 Drag & Drop 1) Place code into the class so that it compiles & generates the out put answer=42 . Note: Code options may be used more than once. Class public class Place here { private Place here object; public Place here ( Place here object) { this.object = object; } public Place here getObject() { return object; } } public static void main(String[] args) { Gen<String> str = new Gen<String>(“answer”); Gen<Integer> intg = new Gen<Integer>(42); System.out.println(str.getObject() + “=” + intg.getObject()); } } Code Options Gen<T> Gen<?> Gen ? T
Image of page 1