subject

1- which of the following correctly creates an anonymous array and passes it's reference to a method named print? a) print ( {1, 2, 3} ); b) print (int [ ] x = {1, 2, 3} ) ; c) print (int [ ] {1, 2 ,3} ) ; d) print (new int [ ] {1, 2, 3} ) ; 2- which of the following shows the header for a method that correctly accepts a reference to an array and returns a reference to an array? a) public static void process (int [ ] x) b) public static double process (int [ ] x) c) public static double[ ] process (int [ ] x) d) public static double[ ] process (int [ ] {1, 2, 3} ) 3- if x is an array of int values with 10 elements defined inside a method, which of the following would return a reference to that array from the method? a) return x ; b) return x[0] ; c) return int[ ] x ; d) return new int[ ] x ; 4- which of the following shows the header for a method that will accept any number of int values? a) public static int add (int x) b) public static int add (int x, int y, int. . z) c) public static int add (int. . x) d) public static int add (int [ ] x) 5- which of the following method headers contains incorrect syntax? a) public static void print ( x) b) public static string getstring (string[ ] x) c) public static string getstring (string x, ) d) public static void print ( x, string y)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
question
Computers and Technology, 24.06.2019 18:20
The following if statement contains a logic error, not a syntax error. rewrite it so that it is correct. assume the variable age already exists and holds a valid number. if (age == 18 & & age == 19) {
Answers: 1
You know the right answer?
1- which of the following correctly creates an anonymous array and passes it's reference to a method...
Questions
question
Mathematics, 30.04.2021 07:10
question
Mathematics, 30.04.2021 07:10
question
Mathematics, 30.04.2021 07:10