Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Oct 20th, 2004, 1:33 AM   #1
stegamann
Newbie
 
Join Date: Oct 2004
Posts: 2
Rep Power: 0 stegamann is on a distinguished road
hey,
im very new to programming, and though im not an idiot, feel free to treat me like one.
so i have an assignment in which i have to read a series of doubles, print them, sort them and print the sorted array, all in different methods.
so im pretty sure i could do it in the main, but when i try to return an array from the service method to the main. im getting an error that says .class expected. well i guess i should post the bit.
double[] series = new double[100];
int index=0;
System.out.println("Please input a series of numbers. "+"Input -888 when you are done.");
double y = SavitchIn.readDouble();
while (y != -888)
{
series[index]=y;
index++;
y=SavitchIn.readDouble();
}
return series[];
so if i try to compile that, i get...
Service.java:23: '.class' expected
        return series[];
                  ^
1 error
anyone have any clue what im doing wrong?
i know it seems like nothing but it would be a big help to me. thanks.

(EDITED (SykkN): fixed your [ CODE ] tags ...)
stegamann is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC