This is output statement.We use print() or println() method to print the message or value of variables. print() method is define under predefined class System (under PrintStream). print() method is called through out object which is also predefined. we can create own output object which call print() method. Example PrintStream myprint = new PrintStream(System.out, true); myprint.println("Hello World!"); How to find length of any word? Please see the below example carefully to know about System.out.println() .If you able to understand the example then you understand System.out.println() eaisly. Class Test { Static String s=“java”; } As you know here Test is a class. “s” is a static variable type String. Here “java” is nothing but the value of “s”. Now I am going to print the length(How many character) of “s”. So i am writing. Test.s.length(); Example Class System { Static PrintStrem out;
What is JAVA? Java is a high-level programming language originally developed by Sun Micro systems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial gives a complete understanding of Java. This reference will take you through simple and practical approaches while learning Java Programming language. Java is a programming language and a platform. What is Platform ? Platform : Any hardware or software environment in which a program runs, is known as a platform. Since Java has its own runtime environment (JRE) and API, it is called platform. History of JAVA James Gosling initiated Java language project in June 1991 for use in one of his many set-top box projects. The language, initially called ‘Oak’ after an oak tree that stood outside Gosling's office, also went by the name ‘Green’ and ended up later being renamed as Java, from a list of random words. Sun released the first public i