Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

duplicate local variable in java

    public static void main(String [] args){
        Scanner sc = new Scanner(System.in);
        String input = null;
        do
        {
          System.out.println("Enter 'A' for option A or 'B' for option B.");
          input = sc.nextLine();
          //input.toLowerCase();
          //input.charAt(0);  
        }
        while ((input != "a") || (input != "b"));
    }
Comment

PREVIOUS NEXT
Code Example
Java :: find object with same attribute java stream 
Java :: parallel sorting in java 8 
Java :: Java Copying Arrays Using copyOfRange() method 
Java :: how to the text of an element in selenium java 
Java :: bukkit scheduled task 
Java :: byte data type in java example 
Java :: how to convert int array to integer list in java 
Java :: how to count lines from txt java 
Java :: hashmap sort by value descending 
Java :: java array to list 
Java :: jackson localdate 
Java :: install java 8 on windows 10 
Java :: java get random char 
Java :: offsetdattime to date 
Java :: android studio textbox change text 
Java :: zip file java 
Java :: minecraft chunk size 
Java :: java transfer file over socket 
Java :: select word from list 
Java :: write json file java 
Java :: java long to int 
Java :: read integer input java 
Java :: collections.reverseorder() in java 
Java :: Fast Lookup of Java 
Java :: get username from jwt token request spring boot 
Java :: split every character in string into array java 
Java :: convert string to character array 
Java :: public String toString() { 
Java :: toCharArray() method java 
Java :: android studio change title bar text 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =