Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args){
- int myInt = 7;
- String text = "Hello";
- String blank = " ";
- String name = "Bob";
- String greeting = text + blank + name;
- System.out.println (greeting);
- System.out.println("Hello" + " " + "Bob");
- System.out.println("My integer is: "+ myInt);
- double myDouble = 7.8;
- System.out.println("My number is: " + myDouble + ".");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement