[Java]How to display Unicode symbol in Java


Unicode symbols are listed in this link http://www.unicode-table.com/en/#00 To get the Unicode number Click on the symbol which you want to print eg : – unicode number for @ is U+0040  which in java is u0040 Below the code segment to print Unicode “@”  on screen System.out.println(“\u0040”); Note : Don’t forget to give  \  Continue reading “[Java]How to display Unicode symbol in Java”

[Java] compiler Error fix for – “The public type <> must be defined in its own file”


If this is the error you are facing while compiling java code , Then Change public class classname to class classname This is because java rule suggests that one public class in one file

[Java][Linux]How to run Hello World program


Create file named HelloWorld_javapgm The content of the file HelloWorld.java is class hello { public static void main(String args[]) { System.out.println(“Hello World”); } } run the following command javac HelloWorld.java which will create hello.class run the following command java hello which will print the string Hello World

[Java]Important things to remember


Father of Java – James Gosling Java created by SUN MICRO SYSTEMS Earlier name of Java – OAK Java was targeted for Internet Development Java is currently owned by ORACLE Corporation C# is closely related to Java Java is purely Object oriented program ByteCode – The intermediate code created by the Java compiler JVM  JavaContinue reading “[Java]Important things to remember”