Breaking News
Loading...

Print special symbols like " , / , \ . ..

3:24 PM
Hi Every ody ,

I some case we have to print some special symbols like ' , " , / , like

that case simply add (forward slash ) \ before printing special symbol

Example :
-----------
here i want to print below message :

Hello " tutorials-Android " by sravan

then use
String str="Hello \" tutorials-Android \" by sravan";

Program :
-----------


public class Demo {
public static void main(String[] args) {
//String str="Hello\"hai\" wat dng";
String str="Hello \" tutorials-Android \" by sravan";
System.out.println(str);

}

}


out Put :
--------

Hello " tutorials-Android " by sravan

0 komentar:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Toggle Footer