Note that there are some explanatory texts on larger screens.

plurals
  1. POCan someone help me fix this code? (Java methods)
    text
    copied!<p>This code is a class that displays my first name vertically down the screen and each letter uses up to 5 rows by 5 columns of a character input by me with a blank line between each letter.</p> <p>It works just fine but the problem is that I used static for the string and my profs says that there shouldn't be static anywhere in the code but main.When I remove static from string c, it breaks the code even if declare string c inside main</p> <pre><code>public class Lab3 { static String c; public static void main(String[] args) { Lab3 classy = new Lab3(); Scanner input = new Scanner(System.in); System.out.print("Which character would you like to display?"); c = input.next(); System.out.println("My name is Jonathan"); classy.displayLetterJ(); classy.displayLetterO(); classy.displayLetterN(); classy.displayLetterA(); classy.displayLetterT(); classy.displayLetterH(); classy.displayLetterA(); classy.displayLetterN(); }//end of main public void displayLetterJ() { System.out.println(" " + c + c + c); System.out.println(" " + c); System.out.println(" " + c); System.out.println(c + " " + c); System.out.println(c + c + c + c + c); } public void displayLetterA() { System.out.println(); System.out.println(" " + c); System.out.println(" " + c + " " + c); System.out.println(" " + c + " " + c + " " + c); System.out.println(c + " " + c); System.out.println(c + " " + c); } public void displayLetterO() { System.out.println(); System.out.println(" " + c + c); System.out.println(" " + c + " " + c); System.out.println(c + " " + c); System.out.println(c + " " + c); System.out.println(" " + c + c); } public void displayLetterN() { System.out.println(); System.out.println(c + " " + c); System.out.println(c + " " + c + " " + c); System.out.println(c + " " + c + " " + c); System.out.println(c + " " + c + c); System.out.println(c + " " + c); } public void displayLetterH() {//H accessor System.out.println(); System.out.println(c + " " + c); System.out.println(c + " " + c); System.out.println(c + c + c + c + c); System.out.println(c + " " + c); System.out.println(c + " " + c); } public void displayLetterT() { System.out.println(); System.out.println(c + c + c + c + c); System.out.println(" " + c); System.out.println(" " + c); System.out.println(" " + c); System.out.println(" " + c); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload