Java development for beginners 3. Variables, expressions and data types.
This video tutorial is the second part of the Tutorial 2, where we introduced the words variables, types and expressions .
In this tutorial we develop these concepts, applying them in different cases in our small program.
Below we can see the code we are going to use in this tutorial:
public class Variable { public static void main(String[] args) { String s="Hola Mundo"; String palabra2=" Ciao"; String resultado=s+palabra2; int a; a = 1; int b = 2; int c=a + b; System.out.println(resultado); System.out.println(s); System.out.println(a); System.out.println(b); System.out.println(c); System.out.println("fin"); } }
In the class Variable we introduce a new datatype; String and we show different cases for assignment, concatenation, as well as for the concepts already introduced.
<< Previous | Next >> |