Java. Cannot assign value to lowerInput because it is immutable and already been given a value

here is my code below, pretty much at the line lowerInput = input.toLowerCase(); it gives me an error saying that I cannot assign a value to lowerInput because it is immutable and has already been given a value. If you know how to fix it, please feel free to fix if you know how to.

import java.io.*;

import java.util.*;

public class XXXXCanadian

{

public static void main (String[] args) throws IOException

{

BufferedReader objReader = new BufferedReader (new InputStreamReader (System.in));

String lowerInput = ""; // declaring variable to work outside the loop

while (!lowerInput.equals("quit"))

{

System.out.print ("Please enter a...

Read More »

By: StackOverFlow - 6 days ago

Related Posts