Find Largest of Three Numbers using Ternary Operator in Java

Write a java program to find largest of three numbers using ternary operator in java. This problem can also be asked like, find maximum of three numbers using conditional operator.

Given three input numbers, Write a java code to print largest or biggest of three numbers using ternary operator.

Suppose, Given three input numbers a, b and c. If a is greater than b and c then a is the largest of three numbers. Similarly, if b is greater than a and c then b is the largest of three numbers else c is largest.

Java Program to Print 1 to 100 Numbers without using Loop

Write a java program to print 1 to 100 numbers without using loop.  This problem is very interesting and tricky for beginners. You have to think how you can print numbers from 1 to 100 without using for and while loop in your code.

We can easily solved this problem using loop (for and while loop).  But suppose you don’t have to use loop to print the numbers.