Click here to watch in Youtube :
https://www.youtube.com/watch?v=IuiyhgFN-vg&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java String Literals |
Java Tutorial : Java String Literals |
public class StringLiteralDemo { public static void main(String[] args) { String quitMsg = "Are you sure you want to quit?"; System.out.println("quitMsg : " + quitMsg); String password = "swordfish"; System.out.println("password : " + password); String value = "Ram asked, \"How are you?\""; System.out.println("value : " + value); System.out.println("hi,\n Welcome\n"); String title = "Sams Teach Yourself Java While You Sleep\u2122"; System.out.println("title : " + title); } }
quitMsg : Are you sure you want to quit? password : swordfish value : Ram asked, "How are you?" hi, Welcome title : Sams Teach Yourself Java While You Sleep™
https://sites.google.com/site/javaee4321/java/VariableDemoStringLiteralApp.zip?attredirects=0&d=1
See also:
No comments:
Post a Comment