Question

Need help with writing Java code: Write a single printf statement that displays the elements of...

Need help with writing Java code:

Write a single printf statement that displays the elements of the first row of t.

 

0 0
Add a comment Improve this question Transcribed image text
Answer #1

for(int i = 0;i<t[0].length;i++){
  System.out.printf("%d ",t[0][i]);
}

Add a comment
Know the answer?
Add Answer to:
Need help with writing Java code: Write a single printf statement that displays the elements of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JAVA Write a Java statement (just a single statement) to sort the second row (first row...

    JAVA Write a Java statement (just a single statement) to sort the second row (first row is at index 0) of the following matrix using Arrays.sort() method. double[][] matrix = {{1.2, 3.4}, {4.2, 2.1, 3.1}, {4.2, 1.9}};

  • I need help writing this java program, here is what it wants me too code. Write...

    I need help writing this java program, here is what it wants me too code. Write a JavaFX application that draws a circle using a rubberbanding technique. The circle size is determined by a mouse drag. Use the initial mouse press location as the fixed center point of the circle. Compute the distance between the current location of the mouse pointer and the center point to determine the current radius of the circle.

  • Need help with my Java Hw: Consider an algorithm that sorts an array of n elements...

    Need help with my Java Hw: Consider an algorithm that sorts an array of n elements by finding the smallest and largest elements and then exchanges those elements with the elements in the first and last positions in the array. Then the size of the array is reduced by two elements after excluding the two elements that are already in the proper positions, and the process is repeated on the remaining part of the array until the entire array is...

  • Write a java program that displays the sum of the elements in Column x of a...

    Write a java program that displays the sum of the elements in Column x of a 2D array (careful with rows of different lengths!)

  • Need help writing this code in C: /*WRITE A FUNCTION THAT MALLOCS 1 PHONE BOOK, INITALIZES...

    Need help writing this code in C: /*WRITE A FUNCTION THAT MALLOCS 1 PHONE BOOK, INITALIZES IT WITH A DEEP COPY OF THE GIVEN STRING, THEN REALLOCS TO 10 PHONE BOOKS, SETTING EACH OF THEM TO THE SAME DEFAULT NAME. YOU MAY USE STRCPY*/ PhoneEntries * initbook(char * defaultstring) { PhoneEntries * pBook; int i = 0; /*UNCOMMENT THIS CODE OUT AFTER YOU FINISH. IT SHOULD PRINT OUT TEST NAME TEN TIMES. for( i =0; i < 10; i++)    ...

  • need help writing code to make this gui in java To review the basics of user...

    need help writing code to make this gui in java To review the basics of user interfaces Directions Create an interface for a program that helps a group of people to calculate how much each of them owes for a restaurant meal that looks like the one below. The interface does not need to do anything in response to user clicks.

  • Need Help Please Using Java Language Create a Code Write a class (and a client class...

    Need Help Please Using Java Language Create a Code Write a class (and a client class to test it) that encapsulates the evolution of the passwords of three students over four months. Your only instance variable should be a two-dimensional array of values representing the passwords. Dimension 1 represents the student and dimension 2 represents the month. (Since we are concerned about security, we are assuming that people change their password once a month; we only care about the value...

  • Write the java code for printing a two dimensional array. You may assume any number of...

    Write the java code for printing a two dimensional array. You may assume any number of row and columns for this array. Just declare the array and write the code to print the elements row by row.

  • JAVA Write a method that returns the sum of all the elements in a specified column...

    JAVA Write a method that returns the sum of all the elements in a specified column in a matrix using the following header: public static double sumColumn(double [][] m, int columnIndex) Write another method that returns the sum of all the elements in a specified row in a matrix using the following header: public static double sumRow( double [][] m, int rowIndex) Write a test program that reads a 3-by-4 matrix and displays the sum of each column and sum...

  • Using C++ e) Write a single statement to set the element of t in row O...

    Using C++ e) Write a single statement to set the element of t in row O and column 1 to zero. f) Write a nested for loop to set each element of t to one. g) Write code to total the elements of third column of t. h) Write nested for loop to read values from screen and store it in the array t. i) Write nested for loop to find and display the lowest element of t.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT