Article View: borland.public.jbuilder.java.language
Article #18740Printing Arrays!!
From: Rob C
Date: Fri, 08 May 1998 00:00
Date: Fri, 08 May 1998 00:00
44 lines
1312 bytes
1312 bytes
Hi All
I'm hoping someone can tell me what I'm doing wrong?
__________________________________________
class PrintString {
public static void main(String args[]) {
String roc = "Rocker";
for (int i = 0; i < roc.length(); i++)
System.out.println(roc.substring( 0, i));
}
}
__________________________________________
with the desired effect bellow being printed to the
Execuion Log
R
Ro
Roc
Rock
Rocke
Rocker
I keep getting this error
Error: (0) initialization error: neither class nor source found for
java.lang.Odject
I tried to import that the above class, still get the wrong error. I'm
working through
the examples in "Borland Learn Java In 14 Days" and I was just trying to
experiment
with the Arrays and Conditional Loops.
am I breaking any assignment laws for the "roc" variable???
thanx in Advance
Rob
Technical Details
Message-ID:
<6itei3$u01@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,4c54a2bc3cc4521f X-Google-Attributes: gidf74b3,public From: "Rob C" <rocker@netline.net.au> Subject: Printing Arrays!! Date: 1998/05/08 Message-ID: <6itei3$u01@forums.borland.com> X-Deja-AN: 351260472 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language