Results 1 to 2 of 2
- 11-15-2011, 02:22 AM #1
Member
- Join Date
- Nov 2011
- Posts
- 1
- Rep Power
- 0
Initing a Class, need a little help.
Hello, so i am trying to initialize a class and i was wondering if anyone could give me some assistance.
package test; public class Int extends Dec { public static void Print(Strin - Pastebin.com
^ Where the main is located. ^ (Int.java)
package test; public class Dec { public class Player { private int hp; - Pastebin.com
^ Where the class is. ^ (Dec.java)
Sorry if i'm coding sloppily, just started using java today with a book I got from the library.
The error isAnd is located at "Player Jim = new Player();" in Int.java;Description Resource Path Location Type
No enclosing instance of type Dec is accessible. Must qualify the allocation with an enclosing instance of type Dec (e.g. x.new A() where x is an instance of Dec). Int.java /Test/src/test line 25 Java Problem
-
Re: Initing a Class, need a little help.
Moderation: post "approved" and is now visible.
Original poster, you might want to post your code in the forum rather than on an off-site as more folks will likely read the code if you do this, and so more will likely help you.
Luck!
Similar Threads
-
Eclipse Compile Error: Call validateValue(Class<T>, String, Object, Class<?>...)
By Tomshi in forum EclipseReplies: 0Last Post: 03-27-2011, 05:49 AM -
super class reference variable accesses overriding sub class method
By subith86 in forum New To JavaReplies: 5Last Post: 01-26-2011, 06:38 PM -
Dynamic loading of a class (passing class definition over the network)
By eddie-w in forum Advanced JavaReplies: 8Last Post: 04-14-2010, 05:49 AM -
[SOLVED] How to pass information from child class to parent class
By pellebye in forum New To JavaReplies: 7Last Post: 05-06-2009, 12:42 PM -
problem in accessing array values of one class in to jframe class
By cenafu in forum AWT / SwingReplies: 8Last Post: 03-21-2009, 09:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks