Shop OBEX P1 Docs P2 Docs Learn Events
Error: "CPU" is either a misplaced package name or a non-existent entity. — Parallax Forums

Error: "CPU" is either a misplaced package name or a non-existent entity.

cassiecassie Posts: 7
edited 2006-09-21 23:30 in General Discussion
I am trying to do a very simple tutorial from the starter book, the one called "Display Primitive Types".

Here is my complete code:

public class DataTypes
{
static boolean logicVal = true;
static char charact = 'a';
static short number = 000;
static int numbah = -2000;
··· public static void main()
··· {
··· System.out.println(logicVal);
··· CPU.delay(20000);
··· System.out.println(charact);
··· System.out.println(number);
··· System.out.println(numbah);
··· }
}

I can get the data types to display through debug, but the "CPU.delay(20000);" line of code seems to be causing trouble. I don't know why- i have previously written similiar code and the delay worked.

Comments

  • cassiecassie Posts: 7
    edited 2006-09-20 20:40
    Im sorry.... i found out why it didn't work i need to declare that it was using the Java index, with the "import stamp.core.*;" line because it didnt know what "CPU" was without that import.
  • voodoofishvoodoofish Posts: 67
    edited 2006-09-21 23:30
    If you're getting started on java, a great book that goes into the full language can be downloaded here...
    by chapter 3-4 you should have a good foundation to really get into working with the javalin proc....going through the manual will be a lot easier as well.

    http://www.mindview.net/Books/TIJ/

    It's helped me immensly in understanding all of the terminology as well as a better understanding of writing classes.
    Everything you would need to learn can be downloaded for free when it comes to java. [noparse]:)[/noparse]

    just my 2 cents...

    -Mark
Sign In or Register to comment.