32,199 Topics

Member Avatar for
Member Avatar for andyhunter

part of bigger code but i cant understand why its not working in the correct range [code] Scanner input3 = new Scanner (System.in); System.out.println("Enter House Number;"); houseNumber = input3.nextInt(); do { System.out.println("You must enter a house number between 1 and 1000"); System.out.println("Enter House Number;"); houseNumber = input3.nextInt(); }while ((houseNumber <1) …

Member Avatar for sincerelibran
-1
115
Member Avatar for chiaig12345

How the computer is not "Random" I want the player can not win! Player only draw! Thank..:yawn:

Member Avatar for chiaig12345
0
62
Member Avatar for Crono

I am writing a program that calculates Fibonacci numbers... But I keep getting an error on my code when I try to compile it...: Fibonacci.java:18: illegal start of expression public int calcFib (int n) { ^ 1 error I don't know what I am doing wrong? Someone help? Here's my …

Member Avatar for sincerelibran
0
259
Member Avatar for kchadek

Yeah I know the usual Palindrome problem, but anyway here it is. Given a number greater than zero and up to 200. Find Palindrome of it by adding its reverse to it and repeating until a Palindrome is reached. If taken more than 10 iterations stop. So here is my …

Member Avatar for kchadek
0
101
Member Avatar for vilas_tadoori

Hi All, I have a first hashmap with some values and I have a second hashmap with diff values. Question: How can I find the diff between two hash maps and print only the difference. ~Vilas

Member Avatar for vilas_tadoori
0
7K
Member Avatar for ThomasNeedsHelp

OK so I have this homework assignment for a java class that I am taking. with the exception of a couple things not working right(search, delete) ive pretty much got it. The problem I am having now is that I need to implement a controlled break so that my report …

Member Avatar for seanbp
0
160
Member Avatar for fengapapitt

I'm trying to write up a little "game" that consists of a U.F.O. that flies in all directions (based on buttons) and explodes when it hits the bottom of the screen. I have 4 classes, 2 of which I'm not allowed to edit. They are: The display window [CODE] import …

Member Avatar for IamAuser
0
147
Member Avatar for 080346

Hi, I'm finding hard to find solved exercices for UML. Mainly with Class diagrams. Any tips ? Thanks

Member Avatar for peter_budo
0
61
Member Avatar for lilacemob99

This is my last resort i have had sleepless nights trying to create this code but have had no luck please can someone help me i need to create a piece of code that fit the requirements below The University wants to make a basic graphical display to show how …

Member Avatar for lilacemob99
0
123
Member Avatar for LianaN

Hi! My JTable is populated from remote DB. I would like to set column names from the DB table column "of_shortTitle". However, if I run query "select * from OrgFolders" then column names are taken from "of_title" by default. The table model is given below. How could I set column …

Member Avatar for quuba
0
587
Member Avatar for paniraj s

Dear Sir, i have encountered an error message mentioned above in line no 2696 & the part of "chatting System "code is as follows: public void run()//2696 { synchronized(dec) { try {while (true) { String message = din.readUTF (); System.out.println("received message from server in RUN.. "+message); messageDecode(message); } // end …

Member Avatar for Slimmy
0
109
Member Avatar for cielle

Hi guys, jfugue is a jar file for music programming. I had run some example from jfugue.. it plays the song. But may i know does jfugue has the method to display the musical notation? N what should i do if i wish to display musical notation as output in …

Member Avatar for cielle
0
272
Member Avatar for Ron2794

I am making a program on library management but in my program I am getting the error when I am extracting the date from MySQl(my database). Below is the short piece of code where I am getting the error. [CODE] Calendar c1=Calendar.getInstance(); ResultSet rs=stm.executeQuery("Select AccessionNumber,Name,Fine,DueDate from issuer natural join classinfo;"); …

Member Avatar for Ron2794
0
623
Member Avatar for ticktock

Hey all I am currently a java beginner and I would like to ask how would I return control to my main if ever I encounter an exception created by me? For example: [CODE]public void checkIn(int roomNumber, String occupantName, int day) throws ExceptionHandler { int checkValue = this.employingHotel.checkIn(roomNumber, occupantName, day); …

Member Avatar for ticktock
0
181
Member Avatar for Khodz

I've been writing a piece of code that will use a brute force approach to find 50 exponential equations that fit 5 points (x,y) that i've entered. The code is fine and works without a glitch.. The problem is when i try to make it keep a record of the …

0
107
Member Avatar for riahc3

Hey Im having a hard trouble drawing in a Java window so if there is a plugin that shows the coordinates in a Java window when I hover my mouse over that spot it would make my coordinate easier.

Member Avatar for adams161
0
183
Member Avatar for dusty_tomorrow

I really need help with a project that I have to write for my intro to Java programming class. I have absolutely no idea what to do or how to do it. I would appreciate any help or starts on the code or maybe, just maybe, a code for this …

Member Avatar for griswolf
0
133
Member Avatar for ShadoX

Hello all, I need to make a PdfPTable with some cells being split or merged into one. The problem is that I can't seem to find a way of doing that. Could someone please help me with this? I spent the last hour on Google and couldn't find anything.. :( …

0
35
Member Avatar for infinitus

Hello i'm having a problem with a program. Let me tell you first what program should do. The program should allow the tutor to enter in the various marks which the students have been awarded, until the tutor enters in a mark exceeding 100. At this point the program should …

Member Avatar for jon.kiparsky
0
447
Member Avatar for McCurry0x77

In an assignment, I have to use four different files in a single program. I know doing so has something to do with inheritance (which we're studying now), but I don't understand how to write each file to use the others. How do I use multiple files in this single …

Member Avatar for hanvyj
0
3K
Member Avatar for sweety_sharma

hello..everyone i m new to this website .i need your advice for project topic.. as i m begineer in java.. plz suggest some gud topics.. waiting for your reply... plz help me....

Member Avatar for masijade
-2
172
Member Avatar for NightFire91

Having problems with completing this code to a working program and running it. What is the final value of sum? What is the value of i when the loop terminates? [CODE]public class SumLargestToSmallest { int n = 2147483647; float old_sum = (float) 0.0; float sum = (float) 1.0; // already …

Member Avatar for NightFire91
0
84
Member Avatar for Him3

Hi all, I want to grab frames from video. (I want multiple frames from a video) using Java. I have tried with the code that is there on sun site. but it doesn't work(as it is for grabbing frames from web cam). If any body knows then reply asap. Thanks …

Member Avatar for peter_budo
0
118
Member Avatar for Ron2794

I am having a project that I have written in Java and now I want to convert that into .exe file so that it can be run on any windows platform. My project is a database connectivity project and I have used Mysql as the backend application I want that …

Member Avatar for peter_budo
0
110
Member Avatar for Girishchethan

Hi Friends, I am new user to this site, and i have problem in java.. please solve this problem. Query: 1.how to move a pointer in the circle using java swings

0
48
Member Avatar for tylerjgarland

[B]This is a homework question[/B] I am attempting to write a hash function that will evenly distribute 20 randomly selected census name into 20 buckets. I may have up to three collisions of two each. [CODE] public int hashCode(Contact c) { // TODO Auto-generated method stub int result = 0; …

Member Avatar for mrnutty
-1
249
Member Avatar for hamste

Hi all! I'm new to Daniweb and to programming. I'm learning Java with the book Java how to program 7th edition. I'm stuck at an exercise where I'm supposed to create three objects that each inputs an hourly rate, number of hours, and a name for the employee given by …

Member Avatar for jon.kiparsky
0
207
Member Avatar for rowen17

these are the classes that i am going to add to my jar file: TestRegform, LogIn, LogIn$AccountInfo, and regForm. I have manifest.txt that contains: Main-Class: TestRegform (new line) then I typed this in the command line: D:\Project>jar cvfm Registration.jar manifest.txt *.class then, these came out: added manifest adding: LogIn$AccountInfo.class(in = …

0
207
Member Avatar for curbster

Hi all, I am in my first Java class at the local community college but my class is online and my teacher takes DAYS to respond via email. I need some help with my homework and thought I would try here. I'm not looking for someone to give me the …

Member Avatar for curbster
0
887
Member Avatar for phantomD

Hi, first post on the site and I hope I'll explain this properly: I'm tasked with creating a TicTacToe Applet using a JButton array. What I can't figure out is the problem I'm having with either setText or getSource (last bit of code). Can someone point out what I've done …

Member Avatar for phantomD
0
244

The End.