Advertisement
Evyatar12

Main.java - Java Tutorials

Feb 15th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. package com.java.tutorial;
  2.  
  3. public class Main {
  4.    
  5.    
  6.     public static void main(String[] args) {
  7.         // מקבץ של סמלים, אותיות, מספרים
  8.        
  9.         String text = "Hello world";
  10.         String text2 = "1";
  11.         String text3 = "!";
  12.        
  13.         // newString = Hello world1!
  14.         String newString = text + text2 + text3;
  15.        
  16.         // newString2 = Hello world 1 !
  17.         String newString2 = text + " " + text2 + " " + text3;
  18.        
  19.         System.out.println(newString);
  20.         System.out.println(newString2);
  21.     }
  22.    
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement