Conditional or Ternary Operator in java programming 2

preview_player
Показать описание
In this tutorial you will learn the working of Conditional or Ternary operator and you will learn message printing along with ternary operator within a printing statement.

Exercise
1. Write a program to enter selling price and cost price of an item and check whether seller has made profit or loss.
2. Write a program to enter a number and check whether number is even or odd. Number divisible by 2 is even otherwise odd.
3. Write a program to enter a number and check whether number is positive or negative. Number greater than 0 is positive.
4. Write a program to enter a year and check whether it is leap year or not. Year divisible by 4 is leap year.
5. Write a program to print commission of an employee, If annual salary of an employee is more than 1 lack then his commission will be 10% else commission will be 5% of annual salary.

#computerskills #programmingera #java #javaprogramming #javatutorial #javatutorialforbeginners #learnjava #javafullcourse #javaforbeginners #javaonlinetraining #javaonlinetutorial #javaonlineclasses #corejava
#operator #conditionaloperator #ternaryoperator #unaryoperator #binaryoperator #relationoperator #bitwiseoperator

Visit our blog for complete chapter
My second channel (Programming Era)

Conditional Operator other videos

Conditional or Ternary Operator in Java programming 1

Conditional or Ternary Operator in java programming 2

Nested Conditional Operator in java programming 3

Java programming introduction other videos

Part 1 Java Programming Language Introduction

Part 2 Printing Demo in Java Programming

Part 3 Printing Demo with variable in Java Programming

Part 4 Printing in Java Programming by Printf function

Part 5 Reading Data By BufferedReader and DataInputStream in Java Programming

Part 6 Reading Data By Scanner Class in Java Programming

Part 7 Reading Data By Command Line Arguments

Part 8 A simple program in java programming

Part 9 Simple program using Math class in java programming
Рекомендации по теме
welcome to shbcf.ru