Question: QUESTION 38 In the following code segment, how can you intialize the value of myX to 102? public class Number private int myX; public Number

QUESTION 38 In the following code segment, how can you intialize the value of myX to 102? public class Number private int myX; public Number (int xmyXX; public void printNumber 0Console. WriteLine(myX); Number nnew Number n=102; Number nnew Number(102) Number nnew Number 0 n.myx 102 Number.myX 102; QUESTION 39 There are several ways to do a compile-time initialization of arrays. All of the following are valid ways EXCEPT anArray- new int [3 ] 100, 100, 100); anArray new int 1100, 100, 100]; a.int o b.int ?.int [ ] anArray-new int [10] {100. 100. 100); dint [ ] anArray 3(100, 100, 100); QUESTION 37 What is printed by the following code segment: int i 23 switch() case 20: Console.WriteLine(i+"") break case 22: Console.WriteLine(i+ ") case 23: Console.WriteLine(i+ case 24: Console.WriteLine(i+ default: Console WriteLine(i+") break break break break O 23 23 23 23
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
