The Java program reads an integer 't' indicating the number of test cases. For each test case, it checks if the input string contains '2026' or does not contain '2025', printing '1' if either condition is true and '0' otherwise. The program uses a Scanner to read input from the user.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views1 page
Program 1
The Java program reads an integer 't' indicating the number of test cases. For each test case, it checks if the input string contains '2026' or does not contain '2025', printing '1' if either condition is true and '0' otherwise. The program uses a Scanner to read input from the user.