That SHOULD fix your IDE giving that "may not be initialized" error.
As for the program in general, you're not quite using the scanner class right.
Okay, the easiest explanation I can do without just showing source code (which I WILL do) is that you need to use the scanner class to assign values to variables, they won't work inside of println() methods, perhaps this example will demonstrate what I mean:
public class Main
public static void main(String args)
/*The basic problem is that the scanner class needs to be used to "catch"
* input and reference a variable to it.
Scanner keyIn = new Scanner(System.in);
//you only need to use System.out.println() to do output, not input.
System.out.println("Enter temp in Celsius");
tempC = keyIn.nextDouble(); // Or .nextLine, .nextInt, .next
System.out.println(tempC + " degrees Celsius is " + ((9/5) * tempC + 32) +
" degrees Fahrenheit.");
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...