Skip to content

Files

Latest commit

 

History

History

19.Chapter_4_practice_set

Java Tutorial: Practice Questions On Conditionals & Switch Case

  1. What will be the output of this program
int a = 10;
if (a=11)
        System.out.println(“I am 11”);
else
        System.out.println(“I am not 11”);
  1. Write a program to find out whether a student is pass or fail; if it requires a total of 40% and at least 33% in each subject to pass. Assume 3 subjects and take marks as input from the user.

  2. Calculate income tax paid by an employee to the government as per the slabs mentioned below:

image

  1. Write a Java program to find out the day of the week given the number [1 for Monday, 2 for Tuesday … and so on!]
  2. Write a Java program to find whether a year entered by the user is a leap year or not.
  3. Write a program to find out the type of website from the URL:
  • .com – commercial website
  • .org – organization website
  • .in – Indian website

Handwritten Notes: Click to Download

Ultimate Java Cheatsheet: Click To Download