32,199 Topics

Member Avatar for
Member Avatar for huvz

Split from - http://www.daniweb.com/forums/thread30207.html > Here's the program that I wrote, but I'm having problems with my ending balance and overdraft fee. The overdraft fee is multiplied by whatever amount I enter: can some help; here's the program: import java.io.*; import java.lang.*; public class BankAccount5 { public static void main(String[]args)throws …

Member Avatar for jwenting
-2
79
Member Avatar for jmguerriero

This is my first post in the Dani community. I am brand new to java, 5 weeks into an intro to computer programming course. My assignment is to create 10 random numbers between 50 and 100. Then I am supposed to sort them from lowest to highest, find the average …

Member Avatar for jmguerriero
0
550
Member Avatar for aaanchal

im working with this program for merge sort. i want to add a counter in it in order to check running / execution time ofd program. please help me. please reply soon. public class mergeSort{ public static void main(String a[]){ int i; int array[] = {12,9,4,99,120,1,3,10}; System.out.println(" Selection Sort\n\n"); System.out.println("Values …

Member Avatar for -ordi-
0
300
Member Avatar for Stefano Mtangoo

What are rules to observer when writting More than one class in single Java file. Let say three classes on the same file Thansk

Member Avatar for kvprajapati
0
136
Member Avatar for jogendar

i am creating a text editor using java swings, i have used rtfeditor kit for saving the file with styles,undo manager for undo/redo.bu tmy problem is that both are not working at a time,i.e., any one of these is only working.... can anyone say how to make both working???

0
52
Member Avatar for merrycit

How can I obtain a value from inside a for loop? I declared the variable in the method and not inside the loop. When I use the same variable in an if statement in the same method however, I get a message saying that the variable has not been initialized. …

Member Avatar for kvass
0
149
Member Avatar for ashkash

I need to take an n number of x and y coordinates from the user and figure out some information based on the inputted points (northmost, southmost, etc.) I wanted to know what the best data structure would be to store the inputted x and y coordinates and be able …

Member Avatar for jwenting
0
59
Member Avatar for smith!

hi there i really need help to write a java program on this i dont understand anything in java plzz i need help. ive put and attachment on so people could have a look at it. thanks [ATTACH]13921[/ATTACH]

Member Avatar for kvprajapati
0
109
Member Avatar for timrhon

Last minute attempts to find what I am doing wrong here. I am a beginning Java Programmer, as you will see, and need help understanding why my paint method will not draw onto the panel. So far all I have tried to accomplish is to get the circle object to …

Member Avatar for timrhon
0
189
Member Avatar for firebugg

Hi, I am having trouble getting back into a loop after an exception has been caught. This is what the program should do... Write a program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, give the …

Member Avatar for firebugg
0
1K
Member Avatar for hendaz

Hi, I am trying to make a memory card game but im not sure how to get started with the GUI part. I have made the frame and the content pane etc and have a working menubar but as to how I would display 40 cards im not sure. I …

Member Avatar for Stefano Mtangoo
0
80
Member Avatar for Leigh Reed

Just started my first unit in Java and my lecturer has set some code with logical errors in it. I think I have found them all bar one. the problem that I am having is that when I run this script it should calculate the Tax for the dollar amount …

Member Avatar for Leigh Reed
-1
130
Member Avatar for merrycit

[CODE]public static boolean rentCar(String id) { for (int i = 0; i < collection.size(); i++) { return( if (id.equals(Car.collection.elementAt(i).carTypeId)) {// if the id equals to the collection.elementAt(i).carTypeId; System.out.println("Please insert the id number of the car you would like to rent>"); id = Keyboard.in.readString(); int quantity; quantity = Car.collection.elementAt(i).carInventory; if (quantity …

Member Avatar for stultuske
0
95
Member Avatar for nucleareactr

Hey all, In computer class as homework we're to create a code to find prime numbers between two values m and n without using an array (since we havn't learned about how to use them yet). so far the code I have is: [code] public static void prime (int m, …

Member Avatar for Ezzaral
0
963
Member Avatar for Clawsy

Hello, I have a script written in Java that gets me an answer from a script containing a number of files. The problem is I don't know how to code this in javaFX script as I am very new to it. [CODE] URL url = new URL(page); URLConnection conn = …

0
139
Member Avatar for anders10

Hi! I want to put up a network with a server and a client. The game shall be implemented in the server. The tictactoe game itself works fine.And I've just started to implement it as you can see from the code. There is supposed to be two players i e …

Member Avatar for BestJewSinceJC
0
141
Member Avatar for JuneM

I am trying to compile this java file and it is giving me an error say : java.lang.nosuchmethodeorror.main what could be the problem? [code=c] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JApplet implements ActionListener { JLabel banner = new JLabel("Your Name"); int fontSize = 18; Font theFont …

Member Avatar for sincerelibran
0
214
Member Avatar for babylonlion

Hi there, All i want to do is read the jokes from a text file (using Scanner) and then write them out to three different files with three different extensions (fileName1.obj, fileName2.dat, fileName3.txt), that's part A. Part B, Create a class called FileWatcher. • This class can be given several …

Member Avatar for BestJewSinceJC
0
143
Member Avatar for laelzio.mosca

I`m trying to write a sample program in java, but the book doesn`t explain how I should write my html code to execute it, I don`t even know what I should use to write a HTML code, I looked online, but didn`t find much. this is the java code: [CODE]import …

Member Avatar for sincerelibran
0
82
Member Avatar for chern4ever

issit possible to let java obtain the path that store the specific .java file?

Member Avatar for chern4ever
0
71
Member Avatar for JuneM

I am trying to compile my java file here but I am getting 8 erros with the same sybmol : illegal start of an expression here is my coding: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JApplet implements ActionListener { JLabel banner = new JLabel("Your Name"); int …

Member Avatar for sincerelibran
0
403
Member Avatar for shivnath

Hi all, I am doing a project work and I need to take the image(just as screenshot) of the first page of any file so that contents of that first page can be viewed by that image . And finally i want to set that image as an icon for …

0
58
Member Avatar for nonexcep

Hi there. I'm learning Java and this is a sample applet in which I try some basic drawing operations. I hit some roadblocks and I'm hoping someone can point me in the right direction. What I want to do here basically is make a rectangle with exactly 10 pixels of …

Member Avatar for gangsta1903
0
104
Member Avatar for rjsud85

how to run the javabean program.... where will be stored in bdk tools folder..... how to create the manifest file and jar file... where will save manifest & jar files in java... please give the information how to working the program.... please send the information in step wise. we are …

Member Avatar for kvprajapati
0
86
Member Avatar for purijatin

hello!When in the below code if iam using a local address instead of yahoo.com,it is executing well,but if iam not using a local address then it is giving a java.net.SocketException.I use a proxy connection and i have set my proxy for java .pl help [CODE]import java.net.*; import java.io.*; import java.io.*; …

0
51
Member Avatar for Mandarinire

Hi guys, Can you help me out with this project. My head is fried with this now. I am getting confused when you have to call on functions outside the class and variables from outside the class. What i need to get done is the following: a. Add a close …

Member Avatar for javaAddict
0
2K
Member Avatar for don_donnay

I have an exam tomorrow and this is a practice program, I am very lost could some body help me please Moving Hero The hero in this scenario should move "forward" whenever act is called. Note that Hero is a subclass of Actor, so there is no move method defined, …

0
85
Member Avatar for PhiberOptik

Hey guys I am playing around with tiled (tileset mapping system) it outputs the maps in an xml style format the core data of where the image pieces go in base64 gzip. [CODE=xml] <data encoding="base64" compression="gzip"> H4sIAAAAAAAAAO3DAQ0AAAwCIHuY4v3LGeSw0UuqqqpPDh0GsvgACwAA </data>[/CODE] I'm not sure where to go to unzip this string, I have …

0
64
Member Avatar for saveyourselves

I am so confused in how to go about starting this, I have the information i need to input into the program but seeing the structure on how the program is laid out is my problem. Any example would be of great help. 1. Sandwich class to simulate the sandwich …

Member Avatar for kvass
1
215
Member Avatar for vampgirl13

Hi Guys, So I'm trying to fix a small problem with my code. It does everything correctly but when reading from the file I want to not count the space between words. For instance if the line is Hello world the output should be: 11: Hello world but instead it …

Member Avatar for vampgirl13
0
105

The End.