32,199 Topics
| |
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) … | |
How the computer is not "Random" I want the player can not win! Player only draw! Thank..:yawn: | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
Hi, I'm finding hard to find solved exercices for UML. Mainly with Class diagrams. Any tips ? Thanks | |
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 … | |
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 … | |
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 … | |
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 … | |
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;"); … | |
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); … | |
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 … | |
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. | |
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 … | |
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.. :( … | |
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 … | |
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 … | |
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.... | |
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 … | |
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 … | |
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 … | |
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 | |
[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; … | |
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 … | |
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 = … | |
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 … | |
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 … |
The End.