Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save LaurentiuGabriel/e1523dd4e7edffaf5402864ce1eaedac to your computer and use it in GitHub Desktop.

Select an option

Save LaurentiuGabriel/e1523dd4e7edffaf5402864ce1eaedac to your computer and use it in GitHub Desktop.
public class Application {
public static void main(String[] args) {
String text = new String();
text = "Hello";
String newString = text + " World!";
String newString2 = text.concat(" World!");
Integer number = 26;
String numberStr = number.toString();
String text2 = "Hello2";
if(text.equals(text2)){
System.out.println("Values are equal");
}
System.out.println(newString);
System.out.println(newString2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment