id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

simona1@sfusd.edu two_d_arrays > twoByTwo
prev  |  next  |  chance

Write a method named twoByTwo that uses toString() to return a string representation of a two-dimensional array of int. The array should be a two by two array containing only 2's. You must cut and paste method toString() from the Hint. This problem is practice for using toString(), since most of the following problems use it.


twoByTwo() → "{{2,2},{2,2}}"

...Save, Compile, Run (ctrl-enter)

public String twoByTwo() { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 305 Post-solution available

Copyright Nick Parlante 2017 - privacy