@FarzanaAlya/

Java Example 1

Java

No description

fork
loading
Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Main {
  public static void main
  ( String [] args) {
    // First print out
    String name = "FARZANA" ;
    String name2 = "How does it feels like to have a tons of free time ?" ;
    System.out.print("Hey, " + name + " , " + name2 ) ;
    // Second print out
    String task = "Learn how to code" ;
    task = "Grab a juicebox" ;
    System.out.print(task) ;
    // Third print out
    String love = "I love ... " ;
    String thing = "Java language !!! " ;
    System.out.print("                                                                                          " + love + thing ) ;
    // Fourth print out
    String End = "How to Space" ;
    System.out.print( "                                                                                          " + End ) ;
    // Fifth print out
    //double is requrie for decimal places to occur
    double first = 5 ;
    double second = 7 ;
    double result = first / second ;
    System.out.print( "                                                                                          " + result ) ;
    //Sixth print out
    String name3 = "Wenz11" ;
    int age = 17 ;
    System.out.print ( "                                                                                        " + name3 + "                                                                                        " + age  ) ;
  }  
}