javascript
Brief description  about Online courses   join in Online courses
View Divya  shree 's Profile

IO/Console Output

HI sir,
Use an array of integers with size 10 and print the content of the array using write ( ) method.
Note: Please do not use System.out.println ( ) method.

import java.io.*;
class ConsoleOutput{
public static void main(String[] args) throws IOException
{
int array[]={1,2,3,4,5,6,7,8,9,10};

System.out.write(array);
}
}
ConsoleOutput.java:7:cannot find symbol
symbol : method write(int[])
location:class java.io.Printstream
System.out.write(array);
^
am not getting the output
Asked by Divya shree | Aug 18, 2010 |  Reply now
Replies (1)
View arun kumar das 's Profile
Hi Divya,

were you able to fix the above problem?

Regards...
JT
Sep 24, 2010