import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
System.out.println("write name");
String name = sc.next();
System.out.println(name);
//vikas only
// if we print full line
String name2= sc.nextLine();
System.out.println(name2);
// if else in string
System.out.println("if else in astring ");
String check = sc.next();
if (check.equals("yes")) //🚩IF ELSE ME yha semicolon ni AAYEGA
//. equal or" use hota h
{ System.out.println("check done");
}
else
{ System.out.println("fail");
}
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: