943,708 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 4185
  • Java RSS
Oct 9th, 2003
1

New to Java

Expand Post »
Hello,

I have been working with Java for appox the last six months but I still am very un-sure of myself. I need help figuring out how to import one Java file to the current one running. I am using Jcreator LE as a source editor/compiler and I wish to rum my program in the Console mode. Any help will be appreciated.

Thank you

Bob
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Bob4life2000 is offline Offline
7 posts
since Oct 2003
Oct 10th, 2003
1

Re: New to Java

If the java class files are in the same directory, you do not need to import them.
Reputation Points: 13
Solved Threads: 0
Light Poster
Dante Shamest is offline Offline
46 posts
since Apr 2003
Oct 11th, 2003
0

Re: New to Java

how though, do i have the program call that class???
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Bob4life2000 is offline Offline
7 posts
since Oct 2003
Oct 13th, 2003
0

Re: New to Java

I figured it out in case you were wondering. Boy do I love Java, lol!!!
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Bob4life2000 is offline Offline
7 posts
since Oct 2003
Oct 13th, 2003
0

Re: New to Java

Ok,

New issue...
I currently have this for source code for the Enemies in my game. class Enemy
{String name=("George");
int Hp;
int Pp;
}

what I want to do is set up a seperate file forenemystorage and then everytime an enemy is created, (I have that working) I want it to go to that file, and randomly (although based on character level) pick an enemy to create, with differen stats names etc etc etc...
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Bob4life2000 is offline Offline
7 posts
since Oct 2003
Oct 16th, 2003
0

Re: New to Java

This might work. Have a different class for each "type" of enemy. Each "type" of enemy can pull random weapons, items, etc. But then make an array of classes, and whenever you want to make a new enemy, pull a random number (with some sort of method) and use that method number as the index number for the array. That way, you get a semingly unique enemy each time.
I hope this made sense
Reputation Points: 46
Solved Threads: 2
Junior Poster
Iron_Cross is offline Offline
117 posts
since Jul 2003
Oct 16th, 2003
0

Re: New to Java

Huh??????

I don't know about the arrays. As i said I have only been working with Java for a relativly short time and I am not sure of how to pull from an array of classes.
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Bob4life2000 is offline Offline
7 posts
since Oct 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: comparing two strings with linear search..
Next Thread in Java Forum Timeline: Creating the piglatin version of a string





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC