Reference no: EM13939906
1 In a two-dimensional array, every row must have the same number of columns. true or false
2 How do you access the element of array a located at row 2 and column 4?
3 An ArrayList can be returned by a method. True or False
4 Is is possible to declare and instantiate an ArrayList of a user-defined class type. True or False
For question 14 to 24, consider the following two-dimensional array declaration and initialization:
String [ ] [ ] cities = { {"New York", "LA", "San Francisco", "Chicago" },
{"Munich", "Stuttgart", " Berlin", "Bonn" },
{ "Paris", "Ajaccio", "Lyon" },
{ " Montreal", "Ottawa", "Vancouver" }};
5 What is the value of the expression cities[2][1]?
6 What are the row and column indexes of Chicago in the array cities?
7 What is the output of this code sequence?
for ( int i = 0; i < cities.length; i++ )
{
for ( int j = 0; j < cities [i].length; j++ )
System.out.print( cities[i][j] + "t" );
System.out.println( );
}
8 What is the output of this code sequence?
int count = 0;for ( int i = 0; i < cities.length; i++ )
{
for ( int j= 0; j< cities.length; i++ )
{
If ( cities [i][j].length( ) ==7 )
count++;
}
}
System.out.println( " count is " + count );
Use a ray diagram to show the image of an object
: Use a ray diagram to show the image of an object 30 cm away from a convex lens with focal length 12cm. Describe the image fully and give the magnification/reduction.
|
Property and casualty insurance
: Joe and Lisa White are a married couple. Joe is 63 and Lisa is 61. Joe is thinking about retiring in a few years, and the Whites have come to you for an insurance evaluation. Lisa plans to continue working even after Joe retires. Joe and Lisa own a h..
|
Assessing the analysis and presentation of results
: You are asked to provide critiques of TWO articles from journals which use quantitative methods. The following checklist, based on the reviewer guidelines of Elseviere.com, provides a basis for assessing the analysis and presentation of results in..
|
What biotechnology application did you choose
: What biotechnology application did you choose? Briefly describe this process or application. What benefits are derived from this?
|
What are the row and column indexes of chicago in the array
: What is the value of the expression cities[2][1]?
|
Calculate the costs transferred out of each department
: Sabor Company produces 18-ounce boxes of an oat cereal. Calculate costs transferred out of each department. Prepare journal entries that reflect these cost transfers.
|
What was the variance of crash-n-burn returns over period
: You’ve observed the following returns on Crash-n-Burn Computer’s stock over the past five years: 15 percent, –15 percent, 17 percent, 27 percent, and 10 percent. What was the arithmetic average return on Crash-n-Burn’s stock over this five-year perio..
|
Company provide ryan with a mobile phone
: He has the use of a company house which has an annual value of £10,750 which cost the company £250,000. Ryan makes no contribution towards the cost of the house or its running costs which cost Maximus Ltd £2,300 in 2011-12.
|
What coupon interest rate must the company set on the bonds
: Preissle Company, wants to sell some 20-year, annual interest, $1,000 par value bonds. Its stock sells for $42 per share, and each bond would have 75 warrants attached to it, each exercisable into one share of stock at an exercise price of $47. The f..
|