32,204 Topics

Member Avatar for
Member Avatar for gangsta1903

As far as I know, exceptions that are not subclasses of runtime exception or error should be caught (handled). When a file exception occurs, it should be caught because its a subclass of exception class, but how can it be recovered? If file is not found,it sounds silly to recover …

Member Avatar for gangsta1903
0
96
Member Avatar for enuff4life

I'm suppossed to create a code that user only inputs 1 and 2 OR 99 to exit the program. if user had put wrong number, then gently ask them again... However, when i put 1, it keeps displaying "you've selected 1" and never ends. Also, when i press wrong number …

Member Avatar for Drosty
0
4K
Member Avatar for enuff4life

I need to creat a method something like... when the user inputs test1 test2 haha test3 end and display that should contain exact same one as above except "end": test1 test2 haha test3 so the "end" is the keyword to finish the inputing... [CODE] String s = new String(""); String …

Member Avatar for stultuske
0
285
Member Avatar for Achupa

Hi, I have an assignment that's giving me some problem: [quote] "1.Add methods to your Human that return collections of arms and legs. implement these methods by iterating through the collection of limbs and checking what type of limb they are. Note that you will need to use the instanceOf …

Member Avatar for stultuske
0
832
Member Avatar for VernonDozier

This is part of a larger project. I've simplified it here. I am implementing a word search program where word puzzles are produced and displayed. There are two main panels. One is the word search panel where there are rows of letters that spell words in different directions. The user …

Member Avatar for VernonDozier
0
5K
Member Avatar for jayjaysam0441

Hello, I need help!!! Very new to programming. I need a program that will display a menu with the letters C,E,F,L and X for exit and allow the user to select a letter from the menu. If the user selects X,print an appropriate message and end the program. If the …

Member Avatar for jayjaysam0441
-1
144
Member Avatar for euphoriae

Hi everyone! I have a homework problem and I can't seem to get it to work. We're supposed to make a snowman melt when you click on it with the mouse, but my snowman refuses to melt. I know it's a problem with the mousePressed method in the MeltingSnowman class …

Member Avatar for Ezzaral
0
180
Member Avatar for anil_forum

I am trying to build an application through which i can send messages from server to client. My application is similar to the windows messenger application of windows operating systems /*(to see windows messenger service go to control panel -> administrative tools -> computer management -> click services & applications …

Member Avatar for stultuske
0
138
Member Avatar for gotrobotfriends

Hi all I was wondering if someone can let me know of a quick and easy way of interacting with a Javascript control on a web page. "<a href="#p189191" name="option66" onclick="selectPollOption(66);" class="vote">Vote</a>" That's the control I would like to activate, I was thinking I could use a regular expression to …

Member Avatar for gotrobotfriends
0
97
Member Avatar for VernonDozier

I have an applet that is not initializing: [code=JAVA] import javax.swing.*; public class WordSearchApplet extends JApplet { public WordSearchApplet (int width, int height) { } public void init () { new WordSearchApplet (700, 800); } } [/code] Here is the error I get. [quote] load: WordSearchApplet can't be instantiated. java.lang.InstantiationException: …

Member Avatar for VernonDozier
0
105
Member Avatar for MrDiaz

Hello, I'm creating a subclass from an already defined class. Let's say I have a class called Student and it has a default constructor. Now I want to create a child class of Student, but when I create it, it seems that it's taking the constructor instead of the actual …

Member Avatar for MrDiaz
0
89
Member Avatar for jagr200

I have a project for school and I cant figure out what to do. I need all the help I can get. Its due tonight and I am stumped. I have spent 7hrs on it today already and Im stumped 100%. Here is the assignment. We use Netbeans to write. …

Member Avatar for VernonDozier
0
146
Member Avatar for cproud21

I wrote the code for the following 2 combo boxes which display a drop-down list of dorm buildings and meal plans for a college student. The code works, and both boxes are displayed. I have completed what I have to do, but want to find a way to get the …

Member Avatar for peter_budo
0
135
Member Avatar for xyzt

hello i try to use SLF4J for logging. i try something like this: [CODE] import org.slf4j.Logger; import org.slf4j.LoggerFactory; import util.HibernateUtil; public class Main { public static void main(String[] args) { Toolbox tool = new Toolbox(); tool.helloWorld(); } } class Toolbox { Logger logger = LoggerFactory.getLogger(this.getClass().getName()); public void helloWorld() { logger.debug("Temperature …

Member Avatar for stephen84s
0
89
Member Avatar for cbickle

i am in a first semester programming class and this probably might seem like a dumb questino to everyone here but i have been working on this for along time and cant seem to come up with anything. i am stuck on 2 programs. the first is to ask for …

Member Avatar for cbickle
0
107
Member Avatar for janamrob

How can I override a method in a base class without using the @Override sign? For example the class Human below overrides some methods in the class Mammal. Do print the output correctly without @ signs in objects. Convert them correctly before outputting. [code]import java.util.*; public abstract class Human extends …

Member Avatar for destin
0
119
Member Avatar for cproud21

I created a combo box for the selection of a dorm.... I need to create another combo box for the selection of a meal plan... Should I write that in another class, or can I add it to this class? I need to display the total of the costs of …

Member Avatar for puneetkay
0
180
Member Avatar for jayjaysam0441

Hello, I am trying to write a program that allows the user to enter a letter and using seven different methods to print out the letters. This display should look like this CCCCCCCCCC CCCCCCCCCC CCCCCCCCCC CCC CCC CCC CCCCCCCCCC CCCCCCCCCC CCCCCCCCCC The method printBlock should accept a character and two …

Member Avatar for Alex Edwards
0
204
Member Avatar for Achupa

Hi, I had posted this question before and I did appreciate the response I got. However I still need some little help as: [B]1.In the addMovieGoers method check that every member of the collection is a human and that they are old enough to watch the movie, if not throw …

Member Avatar for sillyboy
0
181
Member Avatar for Te'DDy

Hi , I lke to write the angram game. But I dont know how to sort the words in random Ex:the words gonna be lke this ..J H R E I O M C I want to let the user to type the meaningful words to choose among from that …

Member Avatar for stultuske
0
788
Member Avatar for Fiery Demon

Hi there, I have an assignment due in a couple of days and I need some help. I don't have time to read a Java books. Plus, my teacher is useless as he can't explain anything...and the TAs are worst. My error is in line 145 (scroll down) saying "illegal …

Member Avatar for VernonDozier
0
120
Member Avatar for TheComputerGuy

Hi there...I can get the input from a user...however I need to add them. I'm thinking I need a loop to add them, and carry the extra if the person adds them. Keep in mind, the max size is 20, and I have no added the error checking in there. …

Member Avatar for sillyboy
0
127
Member Avatar for stevenp123

Hi, I am having some trouble with arrays. I have an array of 5 elements. The values of the array are integers. I want to validate the input using an if statement. (the numbers must be between 10 and 100). I then want to compare the user input to the …

Member Avatar for destin
0
89
Member Avatar for countrygirl1970

Hello, I am trying to get this code to work. I am getting an error code on line 38, that I don't understand why. Can anyone help me out. the error code that I am getting is identifier expected. Thanks, countrygirl1970 [code] // Displaying multiple strings import javax.swing.*; // To …

Member Avatar for countrygirl1970
0
115
Member Avatar for c++ prog

hi we have a programming assignment which computes the volume of a barrel. I don't have a compiler yet and java is not yet recognized by my computer yet because I haven't downloaded any JDK yet because I don't know which one to download...Here's my code so far...Please just review …

Member Avatar for VernonDozier
0
143
Member Avatar for joshmo

I have got two arrays. One for initializing and another for displaying. The display array always shows nothing if the initializing array has not been called. The problem now though is that if I want to insert something in a certain slot in the array nothing happens and I dont …

Member Avatar for joshmo
0
375
Member Avatar for jackieblock

I am just learning Java. I am trying to do a GUI to calculate road trip data. My program compiles, and a window opens, but only the top title line shows. Nothing shows in the center or south areas. What do I need to change? Here is my file. [code=syntax] …

Member Avatar for quuba
0
147
Member Avatar for asus2008
Member Avatar for localp

i am new to java, i am writing this program so where when the user inputs RGB values the resultant colour should be displayed on a frame. (note that you cann't use the [B]color class in java[/B]) 1.) i have successfully completed coding for where the user inputs the RGB …

Member Avatar for peter_budo
0
159
Member Avatar for antaryami

Has anyone tried and succeeded in Inter JVM method calls within a single machine. What I mean is I have two separate applications running on the same machine using two JVMs. Can they communicate and if so what are the related packages and classes. antaryami

Member Avatar for stephen84s
0
218

The End.