32,199 Topics

Member Avatar for
Member Avatar for dana.persad.5

i need help to write a code for the folllowing question. A realtor wishes to track her commissions of house sales. The information that she collects is as follows: house address a string house type a string ( split level, bungalow, etc.) sale price a double She wishes to calculate …

Member Avatar for javabitch.04
0
131
Member Avatar for Arabian filly

hi every one =) I just started to learn trees in java but I am kind a lost with it is implementation I need to understand implementing and tracing methods useing tree interfaces please post any recommended source , tutorial or lecture thank you

Member Avatar for NormR1
0
118
Member Avatar for Viped

Hi, I was creating clone of breakout and got the game working correctly. But after setting up menu my keyboard doesnt respond anymore. But if I launch game directly without Menu class keys are working perfectly. Where the problem might be? Here is the full source code. VBreakOut.java package net.viped; …

Member Avatar for NormR1
0
404
Member Avatar for mukiibi

The code below compares three numbers and it prints out the Maximum and Minimum value, let me hope it will rescue somebody :) import java.util.Scanner; public class MaxMin { public static void main(String args[]) { int w,x, y; System.out.println("\n\nTHE PROGRAM BELOW CALCULATES AND OUT PUTS THE MAXIMUM AND MINIMUM OF …

Member Avatar for bibiki
0
224
Member Avatar for thompsonSensibl

Hello, I'm in a pickle. (Please observe the code) In the actionPerformed method, I don't know how I can get the value of the variable 'minutes'. I can get 'hours' by e.getActionCommand(), but can't do minutes that way. I need to get both 'hours' and 'minutes' at the same action. …

Member Avatar for thompsonSensibl
0
238
Member Avatar for william.bishop.7169

Consider the following: for (int counter = 1; counter < 1; counter -) How many times will the loop execute?

Member Avatar for rohit.deshmukh2009
0
124
Member Avatar for germainelol1

I have a Java class called Term holding polynomials like below public Term(int c, int e) throws NegativeExponent { if (e < 0) throw new NegativeExponent(); coef = c; expo = (coef == 0) ? 1 : e; } I also have an equals method in the same class like …

Member Avatar for JamesCherrill
0
496
Member Avatar for Goldfinch

Hi, I'm having some trouble writing a method to sort a LinkedQueue ADT. I find it difficult to keep track of the order things when sorting is concerned (ha ha ha). I'm trying to pull the values out of a Queue which store objects of type PrinterItem. Those objects in …

Member Avatar for Goldfinch
0
158
Member Avatar for taylor.mitchell.353

I am making a project using hashtables. I have to use a linked list to handle duplicate hashcodes. The Objects that I am turning into hash tables are State objects with just a String name. I have debugged and tested my entire project and cannot figure out why it is …

Member Avatar for taylor.mitchell.353
0
698
Member Avatar for ThisIsMeOrIsIt

Hi all - I need to read a text file using a scanner class that has the following format: 5 5 5 5 5 5 5 0 0 0 0 5 5 5 0 5 5 5 0 0 0 5 5 5 5 0 0 2 0 The first …

Member Avatar for ThisIsMeOrIsIt
0
2K
Member Avatar for Skeldave

Hi, I am creating a simple game and I my game thread and my player2 thread seem to be executing twice each time the Thread.Sleep() expires. This is the output: Starting game: Player 2 thread Game thread Starting game: Player 2 thread Game thread Player 2 thread This is the …

Member Avatar for Skeldave
0
1K
Member Avatar for jamesperkins0

Hi guys, i dont think im using the boolean and break correctly i need it to see the tutormin>=240 and then throw the error and stop without exiting the program. can someone take a look and help me edit it import java.awt.*; //imports all Java.awt import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import …

Member Avatar for jamesperkins0
0
202
Member Avatar for spowel4

Using java, I need to parse a json text file that will contain data according to the layout shown below. The number of email addresses per store will vary. The point is to get a list of stores & corresponding email addresses, then send emails to the addresses. I have …

Member Avatar for boobalan006
0
273
Member Avatar for bhutchison

Hi, I am really struggling with a bufferedReader method i am trying to implement. I have to read text from a file like this : Poland Franciszek,Smuda,63,2009 1,GK,Wojciech,Szczesny,22,11,0 2,DF,Sebastian,Boenisch,25,9,0 3,DF,Grzegorz,Wojtkowiak,28,19,0 4,DF,Marcin,Kaminski,20,3,0 5,MF,Dariusz,Dudka,28,65,2 6,MF,Adam,Matuszczyk,23,20,1 and store it in an array of objects (mine being an array of Player objects which stores …

Member Avatar for JamesCherrill
0
97
Member Avatar for doomsday1216

Hi everyone, I've been trying to turn one of my programs into an executable application, but every time I click the jar file or open it using the command prompt nothing happens. I was wondering if I shouldn't be using "System.out.println" and Scanners to take input/display output. I am using …

Member Avatar for JamesCherrill
0
230
Member Avatar for mbarqadle

I keep getting a .class expected error in the if statement. help please. private int[] hand; private int[] play; public PokerHand(){ this.hand = new int[5]; } public boolean haveCard(int card){ if (play[] == card) return true; } public void displayCards(){ System.out.println(hand); } public void dealCards(){

Member Avatar for ~s.o.s~
0
108
Member Avatar for ObSys

Does a Java applet have to contain a "main" method or does it run from the "init()" method. I have written a small game in java following and example in a book however it does not tell you how to run the damn thing. Code has no erros from what …

Member Avatar for NormR1
0
239
Member Avatar for sobias

Hi everyone, We all face dificullity in coding recursivly, maybe most of new codders and CS students. However, **my question today is related to How many number of execution been made by the recursive method.** Which I think a bit tidious. I'll be updaing this article with new questions any …

Member Avatar for doomsday1216
0
174
Member Avatar for bhutchison

Hi, I have been asked to create a method to store information on the football players for the polish team. I have stored each player in an array of Players[]. My task is to output any players which match the search string. So the method I have to create is …

Member Avatar for NormR1
0
122
Member Avatar for kedxu

I'm probably doing this wrong, because there has to be a way to do this. Here is my current code: import javax.sound.sampled.*; public class soundHandler{ soundHandler() { } public void newSound(String sound) { new soundThread(sound).start(); } } class soundThread extends Thread { String soundName; Clip clip = null; soundThread(String i_soundName) …

Member Avatar for ~s.o.s~
0
370
Member Avatar for FUTURECompEng

I am trying to create a checker program(for a sudoku puzzle) that will read a completed board and then go to determine if it obeys the constraints. If it does, it just says so, if it doesn't it reports the conflict. Where should I start? Thanks.

Member Avatar for FUTURECompEng
0
177
Member Avatar for greystreet34

Hi, I'm working on an assignment where I have to convert military time to standard time. I think I mostly have it solved except for when the minutes are between 0 and 10. For example, 909 should read 9:09 am, but it prints 9:9 am. I'm not sure how to …

Member Avatar for greystreet34
-1
3K
Member Avatar for KRUX17

Hi, Can anyone tell me what is wrong with this code? It seems to be throwing me some error: **non-static method getName() cannot be referenced from a static context.** public void printOrders() { for(Order filename: Orders) { System.out.println("Name: " + Order.getName()); System.out.println("Quantity: " + Order.getQuantity()); } }

Member Avatar for KRUX17
0
122
Member Avatar for Checkerboz

Hi, not too sure if Web Development is the right place for this but anyway: I've never done any web development and I have never created a Firefox extension either but here's the thing: I am making a project for myself, a Java (not JavaScript!!!) program that can add, change …

Member Avatar for Checkerboz
0
319
Member Avatar for KeesA

Is it possible to remove an Icon or ImageIcon once it is set to a JButton or JLabel? When a specific action in my program has taken place, the picture in no more appropriate and I want to remove it from a JLabel.

Member Avatar for JamesCherrill
0
185
Member Avatar for IsaiahLay

**This program is supposed to read data in from a file into an array list and everything compiles correctly so far but when i go to run the applet ProcessNovels it shows a blank window saying "Start: applet not initialized? Im not sure where the problem actually is i am …

Member Avatar for NormR1
0
193
Member Avatar for KeesA

Hallo, I have a Java book from before Oracle took over Sun. In the chapter about pictures for buttons etc., the writer suggest to download a free to use icon set from java.sun.com/developer/techDocs/hi/repository Ofcourse this place does not exits anymore and the Oracle site is not clear to me where …

Member Avatar for KeesA
0
214
Member Avatar for hwoarang69

String query = "create table emails " + "(ID int, " + "To varchar(20), " + "From varchar(20), " + "Message varchar(50))"; this java statment looks right. but getting a syntax error.

Member Avatar for hwoarang69
0
84
Member Avatar for hwoarang69

i already have xammp set up on localhost. and i also added a "mysql-connector-java-5.1.22-bin" file to m exlipse under "JRE SYSTEM LIBRARY" information on xammp: user name: "root" password: "" database: "a_upload" table: "user" in eclipse iam just testing my connection. but i get a error: SQLException: No suitable driver …

Member Avatar for stultuske
0
329
Member Avatar for riahc3

This is a continuation of the last thread. I insert 3 files: Two bins (path and a number) and either a jpg or a bmp This does the following. 1: Connects to FTP and changes to C:/ (/) 2: It checks if a webfolder exists. If it is, goes to …

Member Avatar for riahc3
0
456

The End.