Advertisement
saykotislam

201-15-13993_1(b)

Apr 8th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. package lab.pkg4;
  2. import java.util.Scanner;
  3.  
  4. class Holiday{
  5.     boolean InSameMonth(String a,String b){
  6.         if(a.equalsIgnoreCase(b)) return true;
  7.         else return false;
  8.     }    
  9. }
  10.  
  11. public class Lab4{
  12.     public static void main(String[] args) {
  13.         String a,b;
  14.  
  15.         Scanner n = new Scanner(System.in);
  16.         System.out.println("Enter two String Value:");
  17.         a=n.nextLine();
  18.         b=n.nextLine();
  19.  
  20.         Holiday ho=new Holiday();
  21.         System.out.println(ho.InSameMonth(a,b));
  22.  
  23.     }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement