rachel biji

Greenhorn
+ Follow
since Aug 20, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by rachel biji

Yes I understand ...thanks a lot!!!....

But if an array is empty and not null.....doesnt that nean that storage space is created for it(since the array exists)???
15 years ago

I hope this question is not dumb...

If I do not provide any arguments on the command line then will the string array of main be empty or null?
I tried the following code to find out.... but it shows an "ArrayOutOfBoundsException" error...Why is that ?

public class trial
{

public static void main(String args[])
{
System.out.println(args[0]);

}


}


15 years ago
What is wrong with this code:


(i%2==0)?System.out.println("Even"):System.out.println("Odd");
The complilation error being "Not a statement"

I also tried
(i%2==0?(System.out.println("Even");)System.out.println("odd");));
though it didnt look right..

Can you please give me an explanation?
16 years ago
This code that I wrote

i%2==0?(System.out.println("even"):System.out.println("odd");

The compilation error being "Not a statement". Cant understand whats wrong.I also tried

(i%2==0)?(System.out.println("even");) System.out.println("odd");) ;
even though it didnt look right

Can You please give me an explanation?



[edit]Disable smilies CR[/edit]
[ August 21, 2008: Message edited by: Campbell Ritchie ]
16 years ago