Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lab.pkg4;
- import java.util.Scanner;
- class Holiday{
- boolean InSameMonth(String a,String b){
- if(a.equalsIgnoreCase(b)) return true;
- else return false;
- }
- }
- public class Lab4{
- public static void main(String[] args) {
- String a,b;
- Scanner n = new Scanner(System.in);
- System.out.println("Enter two String Value:");
- a=n.nextLine();
- b=n.nextLine();
- Holiday ho=new Holiday();
- System.out.println(ho.InSameMonth(a,b));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement