Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Salary
- {
- public static void main (String[] args)
- {
- Scanner input = new Scanner(System.in);
- System.out.print("Hai");
- String chunk;
- chunk = input.nextLine();
- int chunkLength = chunk.length();
- char firstChar = chunk.charAt(0);
- char lastChar = chunk.charAt(chunkLength);
- if (firstChar == ':' && lastChar == ':')
- {
- System.out.println("Win");
- }
- else
- {
- System.out.println("Fail");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement