Having difficulty with a java assignment. The book for the class is Introduction
ID: 3852579 • Letter: H
Question
Having difficulty with a java assignment. The book for the class is Introduction to Java Programming, Comprehensive Version Y. Daniel Liang & Prentice Hall
11th Edition / 2018. We are currently working in Chapter 8, Multidimensional Arrays. Below are the questions to the problems. I’m lost in the sauce I need help.
Declare an array variable (not a populated array, numbers only) for each of the following situations.
1) 10 Student’s first names
2) 5 Student’s first and last names
3) 5 Student’s last names and 10 assignment names that can be either essays or labs, not both.
Explanation / Answer
1) 10 Student’s first names
Answer: String firstNames[] = new String[10];
2) 5 Student’s first and last names
Answer: String firstAndLastNames[][] = new String[5][5];
3) 5 Student’s last names and 10 assignment names that can be either essays or labs, not both.
Answer: String lastNameAndAssignment[][] = new String[5][10];
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.