I'm having trouble with this:
import java.util.Scanner;
public class triangleLoop {
public static void main (String[] args) {
int height, row, col, spa;
String hyp;
Scanner kbd = new Scanner(System.in);
System.out.println("Enter the desired height of the triangle: ");
height = kbd.nextInt();
System.out.println("What side do you want the hypoteneuse on? (left/right)");
hyp = kbd.nextLine().charAt(0).toUpperCase();
System.out.println(hyp);
}}
triangleLoop.java:10: error: char cannot be dereferenced
hyp = kbd.nextLine().charAt(0).toUpperCase();
^
1 error
Whats the problem? I'm new to java programming but it looks ok to me. Is there something I'm missing?