Sie sind auf Seite 1von 3

7/15/13

what does this means while((s+ss) == null) ? (Java in General forum at JavaRanch)

A friendly place for programming greenhorns!

Big Moose Saloon


Search

Java FAQ

Recent Topics

Register / Login

JavaRanch Java Forums Java Java in General

Author

what does this means while((s+ss) == null) ?


posted 10/11/2011 8:54:20 PM

naved momin Ranch Hand Joined: Jul 03, 2011 Posts: 675
I like...

view plain

c opy to c lipboard

print

N ote: T ext c ontent in the c ode bloc ks is automatic ally word- wrapped

0 1 . 0 2 . 0 3 . 0 4 . 0 5 . 0 6 . 0 7 . 0 8 . 0 9 . 1 0 . 1 1 . 1 2 . 1 3 . 1 4 . 1 5 . 1 6 . 1 7 . 1 8 . 1 9 . 2 0 . 2 1 . 2 2 . 2 3 . 2 4 . 2 5 . 2 6 .

p u b l i cc l a s sA s s i n g m e n t Q u o t e s{ / * * *@ p a r a ma r g st h ec o m m a n dl i n ea r g u m e n t s * / S t r i n gs ; S t r i n gs s ; v o i dg o( ) { S y s t e m . o u t . p r i n t l n ( s+""+s s ) ; w h i l e ( ( s + s s )= =n u l l) { S y s t e m . o u t . p r i n t l n ( " h i " ) ; } }

p u b l i cs t a t i cv o i dm a i n ( S t r i n g [ ]a r g s ){ / /T O D Oc o d ea p p l i c a t i o nl o g i ch e r e n e wA s s i n g m e n t Q u o t e s ( ) . g o ( ) ; }
1/3

www.coderanch.com/t/555411/java/java/means-ss-null

7/15/13

what does this means while((s+ss) == null) ? (Java in General forum at JavaRanch)

2 7 .

i think that the string has a null value by default ....so if i run this code what i was expecting that while loop should keep repeating and printing "hi" on the command line but that didnt happen because of the statement
view plain c opy to c lipboard print ?

N ote: T ext c ontent in the c ode bloc ks is automatic ally word- wrapped

0 1 .

w h i l e ( s + s s )= =n u l l )

now please explain me what s+ss returns or null or any different values

The Only way to learn is ...........do! Visit my blog http://inaved-momin.blogspot.com/

naved momin Ranch Hand Joined: Jul 03, 2011 Posts: 675
I like...

posted 10/11/2011 8:57:42 PM


naved momin wrote:

view plain

c opy to c lipboard

print

N ote: T ext c ontent in the c ode bloc ks is automatic ally word- wrapped

0 1 . 0 2 . 0 3 . 0 4 . 0 5 . 0 6 . 0 7 . 0 8 . 0 9 . 1 0 . 1 1 . 1 2 . 1 3 . 1 4 . 1 5 . 1 6 . 1 7 . 1 8 . 1 9 . 2 0 . 2 1 . 2 2 . 2 3 . 2 4 . 2 5 . 2 6 . 2 7 .

p u b l i cc l a s sA s s i n g m e n t Q u o t e s{ / * * *@ p a r a ma r g st h ec o m m a n dl i n ea r g u m e n t s * / S t r i n gs ; S t r i n gs s ; v o i dg o( ) { S y s t e m . o u t . p r i n t l n ( s+""+s s ) ; w h i l e ( ( s + s s )= =n u l l) { S y s t e m . o u t . p r i n t l n ( " h i " ) ; } }

p u b l i cs t a t i cv o i dm a i n ( S t r i n g [ ]a r g s ){ / /T O D Oc o d ea p p l i c a t i o nl o g i ch e r e n e wA s s i n g m e n t Q u o t e s ( ) . g o ( ) ; } }

www.coderanch.com/t/555411/java/java/means-ss-null

2/3

7/15/13

what does this means while((s+ss) == null) ? (Java in General forum at JavaRanch)

i think that the string has a null value by default ....so if i run this code what i was expecting that while loop should keep repeating and printing "hi" on the command line but that didnt happen because of the statement
view plain c opy to c lipboard print ?

N ote: T ext c ontent in the c ode bloc ks is automatic ally word- wrapped

0 1 .

w h i l e ( s + s s )= =n u l l )

now please explain me what s+ss returns or null or any different values

i got that

I agree. Here's the link: http://aspose.com/file-tools

subject: what does this means while((s+ss) == null) ?

Similar Threads Problem with output whats wrong in my server code ? java program run external command on Unix Static blocks Constructor
All times above are in your local time zone & format.T he current ranch time (not your local time) is Jul 15, 2013 07:53:15 .

Contact Us | Powered by JForum |

C opyright 1998-2013 Paul W he aton

www.coderanch.com/t/555411/java/java/means-ss-null

3/3

Das könnte Ihnen auch gefallen