saykotislam

201-15-13993_1(b)

Apr 8th, 2021
47
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data