Question
Asked Feb 23, 2020
8 views

1) Write Java code to declare a two dimensional array of 3 columns and 4 rows. The array will hold doubles.

double [][] list = new double [3][4];

What is the array initialized to by default? 

2) Write Java code to find the lowest value in a 2 dim array.

 

 

check_circle

Expert Answer

Step 1

Note: We are authorized to answer only one question at a time. Since you have asked more than one question at the time, we are answering the first question only. Please, re-post your question separately for the remaining question.

 

Program plan:

  • Declare the two-dimension array in java program.
  • Print the two-dimension array without assigning any value in it.
  • The value printed after this is the array initialed by default.
Step 2

Program:

//class defaultinItialized

public class defaultinItialized  {

    //main method

    public static void main(String args[]) {

        //declare a two dimensional array of 3 columns and 4 rows

      double [][] list = new double [3][4];

      //outer for loop for rows

    for(int i=0;i<list.length;i++)

    {

        //inner for loop for columns

        for(int j=0;j<list[i].length;j++)

        {

            //printing array initialized to by default

            System.out.print(list[i][j]+" ");

        }

        //printing new line

         System.out.println();

    }

    

    }

}

Step 3

Sample Output:

Computer Science homework question answer, step 3, image 1

...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Using Boolean algebra properties, simplify the following expression attached.   **Please identify ea...

A: Distributive property: This property allows the factoring or multiplying in of an expression. A(B +...

question_answer

Q: Create a graphical user interface program for solving the quadratic equation ax2 + bx + c = 0. The u...

A: The program is explained in detail in the inlined comments: Java program import javafx.application....

question_answer

Q: You get a call from your friend Pedro panicking that computers in his network have been infected wit...

A: Ways to get rid of virus infection To get rid of virus infection, first an antivirus program should ...

question_answer

Q: This is a Computer Science Question and I need to figure out how write a program that will solve thi...

A: Program Approach-Define a class named Population.Declare and initialize all the variables.As there a...

question_answer

Q: "What are a few things a good cyber security plan should include?

A: A good cyber security plan should include the following, A complete risk assessment of the user’s b...

question_answer

Q: Create a Python program for the attached flowchart.

A: Python program For the given flowchart. The given flowchart has the following statement: Ask User Do...

question_answer

Q: Provide one advantage and one disadvantage for each of the database models.

A: Database Model can be described as an interconnected set of principles in an enterprise to represent...

question_answer

Q: Why CDMA can make users communicate at the same time using the same frequency band without interfere...

A: In CDMA technique, users are distinguished from each other according to their CDMA codes. CDMA uses ...

question_answer

Q: I need help with the following Python 3 question: Suppose you are a bike shop owner who puts togethe...

A: The below given python program will obey the following rubrics:Displaying message to user to enter t...