32,204 Topics

Member Avatar for
Member Avatar for Harris68

Hi, I need help coding the following subject. this is the Subject **************************************************** The program allows customers to list the videos available and to borrow them (ignore returning videos). It records whether a video is on the shelf or on loan, and if it is on loan, the date it …

Member Avatar for Harris68
0
212
Member Avatar for algo_man

Hello programmers, I need someone to give me just hint of how to design an algorithm to the following problem: Suppose you have three types of fax machine: 1. Super fax with the features: colored, high quality and double sided. 2. Colored fax with the features: colored and high quality …

Member Avatar for gusano79
0
71
Member Avatar for kulrik

Having trouble with this one: The formula y = nekt can be used for estimating growth where n is the initial amount k is a constant t is the time y is the final amount This formula will be used for estimating the bacteria growth in a lab experiment. The …

Member Avatar for kulrik
0
2K
Member Avatar for P00dle

Hi guys. I need help with this. I dont know where or how to start, and I dont have peers to help me. I have .txt files that I need to read and sort, then write. The text files are always in this format: 1 row containing column headers, then …

Member Avatar for P00dle
0
87
Member Avatar for bhoop

I want to create exe file from my jar file in java programming. Anyone can help me!

Member Avatar for P00dle
0
93
Member Avatar for Web_Sailor

Hi. I am trying to browse a file and use the path variable in my File code. Both the things are in same class. The problem is that I am getting NullPointerException. Please check if I am doing it correctly Here the code snippet I am declaring [CODE]public class MyClass …

0
56
Member Avatar for jrosh

how to print a resultset in a jtable.. I have retreived the data set and I want it to desplay in a table as it is in the database. How can i achieve it? thnakx.

Member Avatar for masijade
0
75
Member Avatar for AnGuRuSO

so I'm using code from [url]http://schmidt.devlib.org/java/file-download.html[/url] in the hopes of inputting a URL and getting the file that URL points to. It works, sometimes. 90% of the time it doesn't work. Also, it seems a lot of the pages I want to download do not end in html, although I'm …

Member Avatar for nalini.harsha
0
833
Member Avatar for COKEDUDE

Could anyone tell me what is wrong this code please. I'm trying to do this. Add a static method Account consolidate(Account acct1, Account acct2) to your Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. …

Member Avatar for skoiloth
0
207
Member Avatar for COKEDUDE

I'm trying to do some consolidation but I'm not sure on the specific rules of consolidation so I'm having A LOT of difficulty on it. Here's what I'm trying to do. Write a program that prompts for and reads in three names and creates an account with an initial balance …

Member Avatar for COKEDUDE
0
112
Member Avatar for Samyx

What is wrong with my code? [code] String[] movieString = {"movie1", "movie2", "movie3", "movie4"}; JComboBox movieList = new JComboBox(movieString); movieList.addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent e) { JComboBox a = (JComboBox) e.getSource(); //String movies = (String)a.getSelectedItem(); if (e.isSelected()); return subpanel; } }); }[/code]

Member Avatar for BestJewSinceJC
0
78
Member Avatar for ejiroy

I am making this program that will take a positive integer and turn it into this Ex: Enter a positive integer: 245 2 4 5 I am wondering if I am doing this right. I know there might be some parse errors. but all I am concerned with, if is …

Member Avatar for BestJewSinceJC
0
73
Member Avatar for bgirltkc

i'm as new to java as you could ever be. how would i make a table that outputs the sides of a triangle, the perimeter, the angles, and the area?

Member Avatar for BestJewSinceJC
0
67
Member Avatar for axn

How do I reinitialize array to null or zero when reprompted to renter data. Tried this but still computes average for previous entry. Student[] students1 = new Student[studentCount]; here is a snippet of code [CODE]float totalscore = 0.0f; boolean isValid = false; String lastName = ""; String firstName = ""; …

Member Avatar for Chaosis
0
385
Member Avatar for Alex_is

basically i have created a program which reads integers from a txt file and works out the averages etc. now the below code i wrote to simply state which month has the highest or lowest rainfall. below i have created the code but on compiling says there an error....can someone …

Member Avatar for thines01
0
149
Member Avatar for neighbordave

I am trying to get two numbers to overflow and print an error message stating this. it works for some numbers, but other numbers for example adding the numbers 1073741824 and 1073741825 results in a negative number -2147483647 which is clearly overflow. However, I cannot get these negative numbers to …

0
77
Member Avatar for Shayko

hey, in my code i'm using Runtime.getRuntime().exec() in order to run a .bat file that calls another java program (they communicate with each other using RMI). when i call: Process process = Runtime.getRuntime().exec("cmd /c start C:\\MyFolder\\JavaApp.bat"); the seperate process runs perfectly, but when i add a space to the path: …

0
46
Member Avatar for nonshatter

Hey, can anyone tell me what's wrong with this method? I keep getting <identifier> expected error on line 1. [CODE]public static void FaultHandler (DatagramSocket aSocket, InetAddress aHost, int proxyPort, byte[] requestArray, rec_bytes) { int faultCount = 0; while ( faultCount < 4 ) { DatagramPacket request = new DatagramPacket(requestArray, requestArray.length, …

Member Avatar for nonshatter
0
84
Member Avatar for Ballen92

Hello all. I have a problem that seems like it should be relatively simple to fix but I have been scouring the internet and can't find an answer =( I am trying to add a keylistener to this code, but it doesn't recognize the method addKeyListener(this); I am working with …

Member Avatar for Ballen92
0
782
Member Avatar for kiranpvsr

1.Uses a socket object to open a socket connection to “[url]www.google.com”[/url] on port 80. 2. Constructs a PrintWriter and a BufferedReader from the socket 3. Sends a HTTP request for the page “[url]www.google.com”[/url]. If your PrintWriter is called “out” then you could, for instance use the code: out.write("GET /~rdb/page/index.html \n"); …

Member Avatar for Devoted Hosting
0
140
Member Avatar for Watti

[code] import java.util.*; import java.io.*; public class testing { public static void main(String[]args) { int NoOfLines=0; int i=0; String fileName = "tingtings.txt"; String line; String[] lines = new String[1000]; try { BufferedReader brStream1 = new BufferedReader(new FileReader(fileName)); while ((line = brStream1.readLine())!= null) { NoOfLines++; } while ((line = brStream1.readLine())!= null) …

Member Avatar for AndreiDMS
0
1K
Member Avatar for goon

Hi, I recently got my SCJP last month and really need info on where I can find opportunities for a java programmer in nigeria. And would also be very grateful if anyone could advise me on the advanced technologies I should start looking at esp in terms of marketability around …

Member Avatar for goon
0
126
Member Avatar for rfs_silent

hi i need help in my project which is . Create a program that creates a user interface for practicing times tables. the numbers to be multiplied should be randomly generated. the product should be randomly generated. the product should be a number less or equal to 100.

Member Avatar for cgeier
0
70
Member Avatar for adcodingmaster

hi all [COLOR="Red"]i m making chess in java and have a problem. Plz if u can help me out.[/COLOR] [B][I][I][I][U]Problem is[/U][/I][/I][/I][/B] when i add a JPanel to a JFrame it sets the size of JPanel given by me in the code. but when i add another JPanel then it automatically …

Member Avatar for walid faraj ali
0
180
Member Avatar for gibson.nathan

im relatively new to trying to program in oop. i have been slowly working through this entire program learning as i go. i have gotten this class to compile. [CODE] /** * Write a description of class CO2Footprint here. * * @author (your name) * @version (a version number or …

Member Avatar for AndreiDMS
0
104
Member Avatar for Ryujin89

Putting it out there that this is a school assignment. I have nearly all of the code figured out, but the instructions make getting the output and variables to match up. If anyone can assist in seeing what the instructor intends for us to do, I would greatly appreciate it. …

0
102
Member Avatar for johnyjj2

Hello :-)! I'd like to create application for mobile phone (maximum price of phone would be about 220USD, it is for Central Europe; I will be testing the application on Sony Ericsson k750i and maybe on Motorola V500). The application must recognize speech and properly react for recognized numbers (calculate …

Member Avatar for johnyjj2
0
183
Member Avatar for Harris68

Hi, I ap posting my Assignment subject here, and hope to get some helps with each Classes, I am not asking that you do all my home works but to give me hints as I want to learn something and as I am new to Java I am block some …

Member Avatar for Harris68
0
180
Member Avatar for theStruggler

Hey everyone, I am trying to write a code which would read a file and print the number of words and sentences in each of them. I want to take everything step by step; so I am making sure that all my methods work perfectly before proceeding. In the code …

Member Avatar for theStruggler
0
101
Member Avatar for eleal

I'm trying to write an instant messaging program in Java. What I have coded so far, goes like this: Each client connects to a thread created by the server, to which he/she sends the message. My doubt is, how can I kill all the threads that have been created by …

Member Avatar for gangsta1903
0
160

The End.