Posts

Java tutorial#part3

Hello friends today we will discuss more on data types. So, let's start,                   if we write something like this: class main{ public static void main(String[] args){ int a=1; int b=2; System.out.println(a+b); } } Then the output will be: 3 !!!!Attention not: 12 But if we write something like this then: class main{ public static void main(String[] args){ int a=1; int b=2 System.out.println(a+""+b); } } Then the output will be: 12 Also the same with char & Strings. Here's the code class main{ public static void main(String[] args){ String i="hello"; String y="world"; System.out.println(i+" "+y); } } OUTPUT: hello world We can also arithmetical operations: class main{ public static void main(String[] args){ int a=3, b=2; System.out.println(a+b); System.out.println(a-b); System.out.println(a*b); System.out.println(a/b); } } OUTPUT: 5                       1  ...

Java Tutorial#part2

Hello friends today's topic is data types So today we will discuss about data types.     There are mainly five data types- int, char, float, double, boolean. We write them like this in program:     class program{ public static void main(String[] args){ int a =20; char h ='Hello' float b = 3.1f; double c = 32.20; boolean n = True; System.out.println(a); System.out.println(b); System.out.println(c); System.out.println(h); System.out.println(n); } } we can use the in different manner. Next time i will show you some function with them. BYE!! See you next time                                                                                                                       ...

Java tutorial#part1

Hello friends I am ariyo halder. I learned Java at the age of 12. Really it was very amazing to learn. It was my first programming language that I learned. Let's start with the basics of java. Java is an object-oriented programming language that is easy-to-use. The first name of java was Oak.          Installation of JDK Download JDK from the official website of oracle. Then install it in your pc. Add JDK to path- system>security>device manager>environment variables>add new.   Then paste the path of bin folder of program file in JDK. Now you are good to go. Let's write  a hello world program in java. Class main{ Public static void main (String [] args){ System.out.println("Hello world")      } } OUTPUT: Hello world See you guys in my next post.