It is said " Write Once, Run Anywhere ". This is Java! Unlike any other programming language, Java is to be written once and can be compiled in any corner of the world. It is platform independent . How Java works? The aim is to write one program and make it work on whatever device your peers have! Create a source document using java Run your document through a source code compiler. The compiler checks for errors and won't let you compile until its satisfied that everything will run well. The copiler creates a new document, coded into java bytecode. Any device capable of running will be able to interpret/translate this file into something runnable. Rephrasing, the compiled bytecode is platform independent. Now, you can wish your friend "Happy Holi". Your friends don't have a physical java machine but the all have a virtual java machine running inside their electronic devices. The virtual machine reads and runs the byte code. This is what happen...
Let's start coding! This post is all about operators in Java. Previous we had learnt about how to declare variables, what are the data types, how to initialize variables, etc and now you might want to know what to do with them. Operators are a good place to start with Java programming. What are operators in Java? Operators are special symbols that perform some tasks/ operations on more than one variables called operands and returns a result. Assignment, Arithmetic and Unary Operators Simple Assignment Operator " = ": This is the most commom operator that you'll come across. It's primary purpose is to assign the value from it's right to the operand at its left. Eg: int count=1; Here the integer type of variable 'count' is assigned the value 1.