All Computer Science Resources
Example Questions
Example Question #3 : Arrays
Which of these instantiate a matrix called matrx with 5 columns and 4 rows that takes in integers?
Possible Answers:
int [] [] matrx = new int [] [5];
int [] [] matrx = new int [5] [4];
int [] [] matrx = new int [5] [];
int [] [] matrx = new int [4] [5];
int [] [] matrx = new int [] [4];
Correct answer:
int [] [] matrx = new int [] [4];
Explanation:
You create a matrix also known as a 2 dimensional array the same way you'd instantiate a normal array except the first array space remains blank and you'd insert the number for the amount of rows. Due to the fact that you want 5 columns and 4 rows, you'd only input the 4 into the second array.
All Computer Science Resources
Computer Science Tutors in Top Cities:
Atlanta Computer Science Tutors, Austin Computer Science Tutors, Boston Computer Science Tutors, Chicago Computer Science Tutors, Dallas Fort Worth Computer Science Tutors, Denver Computer Science Tutors, Houston Computer Science Tutors, Kansas City Computer Science Tutors, Los Angeles Computer Science Tutors, Miami Computer Science Tutors, New York City Computer Science Tutors, Philadelphia Computer Science Tutors, Phoenix Computer Science Tutors, San Diego Computer Science Tutors, San Francisco-Bay Area Computer Science Tutors, Seattle Computer Science Tutors, St. Louis Computer Science Tutors, Tucson Computer Science Tutors, Washington DC Computer Science Tutors
Popular Courses & Classes
GMAT Courses & Classes in Denver, ACT Courses & Classes in Washington DC, GMAT Courses & Classes in Chicago, GMAT Courses & Classes in San Diego, GMAT Courses & Classes in Seattle, SSAT Courses & Classes in Los Angeles, SAT Courses & Classes in Philadelphia, LSAT Courses & Classes in Los Angeles, ACT Courses & Classes in Miami, SAT Courses & Classes in Miami