Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Problem1 {
- public static void main(String[] args) {
- String result = "1";
- String stringA = "Some unique string";
- String stringB = "Some unique string";
- Object obj = (Object) stringA;
- if (obj == stringB) {
- result += "1";
- }/*else*/if (obj.equals(stringB)){
- result+= "2";
- } else{
- result += "3";
- }
- int i = 0;
- String newString = i++ + "4" + ++i;
- newString += i++;
- result += newString;
- int x =3, y=5;
- int a = x+y-x/y+2;
- int b = (x+y)-x/(y+2);
- result += "" + a + b;
- System.out.println(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment