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 10:50
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
question
Computers and Technology, 22.06.2019 23:20
How can you tell if someone sent you a text message to your email instead of a email
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. â–ş print out all positive integers from 1 to 100, inclusive and in order. â–ş print messages to standard output, matching the sample output below. â–ş in the output, state whether the each integer is 'odd' or 'even' in the output. â–ş if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. â–ş if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. â–ş design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
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
Biology, 24.05.2021 14:00
question
Mathematics, 24.05.2021 14:00
question
Mathematics, 24.05.2021 14:00
question
Mathematics, 24.05.2021 14:00
question
Mathematics, 24.05.2021 14:00
Questions on the website: 13722367