This is my code in Java
import java.util.Scanner;
class calc
{
public static void main(String[] args)
{
boolean go=true;
Scanner input=new Scanner(System.in);
while(go)
{
int num1;
int num2;
int total;
int choice;
System.out.println("\nHi This is Console type Calculator");
System.out.println("1. Addition");
System.out.println("2. Substraction");
System.out.println("3. Multiply");
System.out.println("4. Divisoin");
System.out.print("Enter Your Choice : ");
choice=input.nextInt();
switch(choice)
{
case 1:
System.out.println("Enter First Number");
num1=input.nextInt();
System.out.println("Enter Second Number");
num2=input.nextInt();
total=num1+num2;
System.out.println("Addition of "+num1+" and "+num2+" are "+total);
break;
case 2:
System.out.println("Enter First Number");
num1=input.nextInt();
System.out.println("Enter Second Number");
num2=input.nextInt();
total=num1-num2;
System.out.println("Substraction of "+num1+" and "+num2+" are "+total);
break;
case 3:
System.out.println("Enter First Number");
num1=input.nextInt();
System.out.println("Enter Second Number");
num2=input.nextInt();
total=num1*num2;
System.out.println("Multiplication of "+num1+" and "+num2+" are "+total);
break;
case 4:
System.out.println("Enter First Number");
num1=input.nextInt();
System.out.println("Enter Second Number");
num2=input.nextInt();
total=num1/num2;
System.out.println("Divistion of "+num1+" and "+num2+" are "+total);
break;
default:
System.out.println("Please Choose right option...Try again");
break;
}
System.out.println("Do You Want more Calculation...Yes/No");
String str=input.nextLine();
System.out.println("Do You Want more Calculation...Yes/No");
String str1=input.nextLine();
if("no".equals(str1))
{
go=false;
System.out.println("Thanks For using...Bye");
}
}
}
}
And I have problem in the following portion of code as taking input. This is not taking any input from user skip this part. Is there any problem in this code.
System.out.println("Do You Want more Calculation...Yes/No");
String str1=input.nextLine();
if("no".equals(str1))
{
go=false;
System.out.println("Thanks For using...Bye");
}

Scanner.next, that will search for the next complete token.if(str1.equalsIgnoreCase("no")){}in place ofif("no".equals(str1))