This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1AFJxSnwCFVMruvWkSTxy1NqjzJLegNJH4 https://explorer.blockstack.org/address/1AFJxSnwCFVMruvWkSTxy1NqjzJLegNJH4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String s1 = "aaa"; | |
String s2 = "aaa"; | |
if(s1.equals(s2)) | |
System.out.println("s1 == s2 is TRUE"); | |
else | |
System.out.println("s1 == s2 is FALSE"); | |
Output: | |
s1 == s2 is TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String s1 = "aaa"; | |
String s2 = s1; | |
if(s1 == s2) | |
System.out.println("s1 == s2 is TRUE"); | |
else | |
System.out.println("s1 == s2 is FALSE"); | |
Output: | |
s1 == s2 is TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String s1 = "aaa"; | |
String s2 = "aaa"; | |
if(s1 == s2) | |
System.out.println("s1 == s2 is TRUE"); | |
else | |
System.out.println("s1 == s2 is FALSE"); | |
Output: | |
s1 == s2 is FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int a; // This is a declaration without initialization | |
double n = 2.25; // A declaration and initialization (first assignment) | |
n = 8.3; // An assignment to a new value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class KeepGuessing { | |
public static void main( String[] args ) { | |
Scanner keyboard = new Scanner(System.in); | |
int secret, guess; | |
secret = 1 + (int)(Math.random()*10); | |
System.out.println( "I have chosen a number between 1 and 10." ); |