Which one of the following will declare an array and initialize it with five numbers?
Correct Answer: int [] a = {23,22,21,20,19};
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Java Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Java MCQ Questions
public interface Foo { int k = 4; /* Line 3 */ } Which three piece of codes are equivalent to line 3? 1, final int k = 4; public int k = 4; static int k = 4; abstract int k = 4; volatile int k = 4; protected int k = 4;
Which is true? (Choose all that apply) 1: public class UpWork { 2: 3: public void freelancer(boolean time) { 4: 5: if (time) { 6: 7: } 8: System.out.println(result); 9: 10: } 11: }
Output of the given program? public class Test96 { public static void main(String[] args) { int[] a = new int[2]; System.out.println(a.length); } }
Result of the code? public class Quest { int i=0; public static void main(String argv[]) { } Quest() { top: while(i <2) { System.out.println(i); i++; continue top; } } }
Which is true? (Choose all that apply)
Output of following program? class Upwork { public static void main(String args[]) { int x=100; double y=100.1; boolean b= (x=y); System.out.println(b); } } void
Which is true?
What is the purpose java.exe?
Which method is used to pause thread execution for X seconds, so it might resume its execution after that?
We are writing an application to manage auto parts. Auto part has String key as id. Which collection will be the most efficient, if we are going to search parts by id?