Newbie question - on syntax error
I am completely new to java so bear with me.
I am working through the netbeans tutorial
(http://www.netbeans.org/kb/docs/java/javase-intro.html) which has me create
two packages: pasted below.
I am getting a syntax error: "cannot find symbol: variable LibClass". The
code is pasted directly from the tutorial so it should be accurate. I
suspected that the environment can't "see" LibClass because soemhow I
screwed up adding the other library to my application. However, when I use
Ctrl-space to do code completon on ibclass.acrostic it shows me the package
and method definition. This tells me that the environment can find LibClass.
Can someone suggest what I might have screwed up? It sucks to hit a bick
wall so early in the tutorial process.
Thanks,
Steve
package acrostic;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String result = LibClass.acrostic(args);
System.out.println("Result = " + result);}}
package org.me.mylib;
public class LibClass {
public static String acrostic(String[] args) {
StringBuffer b = new StringBuffer();
for (int i = 0; i < args.length; i++) {
if (args[i].length() > i) {
b.append(args[i].charAt(i));
} else {
b.append('?');
}
}
return b.toString();
}
}