No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
For a CS project, I need to have my program "gracefully terminate" in case of certain user input errors. What is the best syntax to do this? |
|
Assignment: Create a program to practice reading in from a file, search for a particular word when the user inputs a word to search for and a file via command line args. Print out the entire line each time it is found. Progress: It compiles, and runs.... kinda. Problem: I … |
|
I habitually compile after every change I make, i had all of 5 minutes to start a project and this will not compile!!: [CODE] public class Battleship{ public static void main(String[] args){ int boardInput = parseInt(args[0]); } }[/CODE] I get this error: Battleship.java:19: cannot find symbol symbol : method parseInt(java.lang.String) … |
|
So, I am working on a project that uses inheritance. I have a class Creature, which extends Thing. Also, I have classes Tiger and Ant that extend creature. I also have a TestCreature class. All of these are in the same directory, and they all compile. However, when I run … |
|
Alright, this is for a project designed to make us use inheritance. This is Creature, which is a subclass of Thing. Creature is supposed to be able to eat, move and tell what it ate. Here are my issues: 1. How do I use a constructor from Thing in Creature? … |
|
Stupid question, I'm sure: For an assignment I need to create a program that uses methods and constructors in several other classes... the classes were in a file that I unpacked and put in the same directory as the one I'm writing is in. What do I need to do … |