Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///http://www.sanosay.org/courses/oop/lectures/misc/
- public class MyName{
- public static void main(String[] args){
- // Set the name
- String name = "Dimitris";
- /**
- Set the surname and the age
- */
- String surname = "Diamantis";
- int age = -1;
- // print out the data
- System.out.println("My name is: "+name +" "+surname);
- System.out.println("And my age is: "+age);
- }
- }
- public class Operations{
- public static void main(String[] args){
- double x=5;
- double y; /// int y = 0;
- y = 10;
- y+=1;
- y++;
- y = y+1;
- y = 9;
- double z = x/y;
- boolean a = true;
- boolean b = false;
- String hello = "world";
- hello = "Hello " + hello +" "+ z;
- System.out.println(hello);
- System.out.println(x+y);
- System.out.println(x*y);
- System.out.println(x-y);
- System.out.println(z);
- }
- }
- public class Main{
- public static void main(String[] args){
- System.out.println(" *");
- System.out.println(" ***");
- System.out.println(" *****");
- System.out.println(" *");
- }
- }
- public class Main{
- public static void main(String[] args){
- System.out.println("Hello world!!!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement