What Is Java?

Java was originally a programming language invented by Sun Microsystems, by James Gosling. Today Oracle owns Sun, and therefore Java too. Java is thus Oracle’s trademark. Over time Java has evolved into more than just a language. It is a full platform with lots of standard APIs, open source APIs, tools, a big developer community … Read more

Java Program to print Odd numbers from 1 to n or 1 to 100

public class JavaEx { public static void main(String args[]) { int n = 100; System.out.print(“Odd Numbers from 1 to “+n+” are: “); for (int i = 1; i <= n; i++) { if (i % 2 != 0) { System.out.print(i + ” “); } } } }