32,204 Topics

Member Avatar for
Member Avatar for server_crash

I made a program that simulates the roll of a six sided dice. I had my program return a random number between 1 and 6. The weird thing is I get 4 like 6 out of 10 times each time I run the program. So is the random number genarator …

Member Avatar for felgall
0
133
Member Avatar for BrownSuga

I am writing a program that calculates the bill when buying eggs by the dozen. I have for the most part figured out most of the code but, I am getting an error message that is saying "variable price might not have been initialized. Here is the code please help …

Member Avatar for BrownSuga
0
110
Member Avatar for grifflyn

I have just embarked on a Java programming course and have been given a task to work out the volume of a cylinder in cubic inches with a given radius and height. and then to convert it from cubic inches to to cubic Cm's which i have done fine. My …

Member Avatar for server_crash
0
232
Member Avatar for Sheryl

Hi People who have this kind heart who could help me in my Java Programming Language Project.. I cannot sleep since last week coz I can't find a way how to solve my problem in Java My teacher told me to make a simple game using Java programming Application. Since …

Member Avatar for alc6379
0
118
Member Avatar for joebanks

im trying to sort through an array and i keep getting a null pointer exception when i do... can anyone see where im going wrong....thanks getreleasedate() gets the gregorian calendar date for each object in array. new CD() creates an empty array that can hold five objects public void sortByNewest() …

Member Avatar for joebanks
0
153
Member Avatar for Rentro

Well I got the whole thing working.. thanks a lot. Now I've gotta strugle with the "stdin.readline()" which doesn't wanna work for some odd reason :P I imported the java.io.* i created a new BufferedReader ... and it just doesn't wanna work. Are there any other ways of getting input …

Member Avatar for Rentro
0
79
Member Avatar for PeterX

Hi! How can we print out boolean???? I mean when the method returns false or true. ex: public boolean test(int a, int b) return true return false thanks peter

Member Avatar for Narue
0
52
Member Avatar for rishiraj_bayerd

Hi all, i want to know [B]how jvm works,internal architecture of jvm.....all the the technical information about jvm[/B]...Because it is my seminar tropic. Please help me......It very urgent... Thanking you.... regards Rishi

Member Avatar for cosi
0
157
Member Avatar for tejasmehta

I wrote web Apllication with Servlet/JSP and JDBC. I want to introduce Struts in my prev and new application. All application are database oriented, like resumebuilder, library cataloge viewer and cart application for displaying as well as shopping appliances. My main query is till now I used java core, javascript, …

Member Avatar for cosi
0
155
Member Avatar for eboney

Hello everyone, I am trying to write a program that will list all my videos by title and also by ID# and sort titles. Also I want the user to enter a ID# and they would see what title is associated with the id #. Can anyone give me a …

Member Avatar for Banderson
0
98
Member Avatar for NJR

:cry: I am trying to create a 2d array that will store the information i hold in the txt file (which is in this format x,y - 45 50 36 47 60 56 etc then i am supposed to calculate the distance btn x and y and store it in …

Member Avatar for NJR
0
95
Member Avatar for freesoft_2000

Hi everyone, I am doing a simple compression program in which the application uncompresses the file to a selected folder. The thing is that the file that is being compressed already exists in that folder. What i need is someone to show me a way in whic the file is …

Member Avatar for cosi
0
106
Member Avatar for Cocteau

My browser needs to access a System that is Java developed. But my IE seems not working normal. Im using Windows 2000, IE is version 6 SP1. There is a guide to set the correct settings in the browser to access the system correctly. I have set most of the …

Member Avatar for antioed
0
220
Member Avatar for freesoft_2000

Hi everyone, I have a problem with the fundamentals wit serversockets and sockets in java. In the constructor of the java socket as shown below Socket(InetAddress address, int port) In the above constructor what do they mean by address? In the below java constructor as shown below Socket(String host, int …

Member Avatar for alc6379
0
115
Member Avatar for focusenergy1

I am trying to install JAVA JRE so I can run a program. But when I try downloading it it says Installer cannot proceed with the current proxy settings. I change the LAN settings as they promted me to but it asks for the address and port number which I …

Member Avatar for nanosani
0
182
Member Avatar for bobbyross

Please help me with and example of Java code for project that I must write as a new student that never seen the code before. I must create a program that does Mortgage calculations the number are as follow terms 360 interest rate 5.75 loan amount 200.000 and I must …

0
136
Member Avatar for PeterX

Hi! 1. My metod has 4 int parameter, and return true if least one of those parameter can be dividable with 5. otherwise return false. 2. if least two or three of those parameter can be dividable with 5. Code: class Test{ public static void main(String[]args){ NumberTest myNbr=new NumberTest(); int …

Member Avatar for nanosani
0
81
Member Avatar for Jason Marceau

Hi, I have to write a program that tests if a number entered is prime or not. I have finished all the code to display input prompts and output message Example: " Enter a number: " - " x is a prime number" - " x is not a prime …

Member Avatar for nanosani
0
129
Member Avatar for Jason Marceau

Hi, I have written a program that accepts a positive integer as input and determines whether or not the number is prime, it all works accept when a number is prime it should display " x is a prime number " and continue to prompt for user input ( loop …

Member Avatar for jerbo
0
144
Member Avatar for bheng

[FONT=Arial Narrow]undefined[/FONT] please help me to make my Java programming project. my teacher required me to make at least a very simple game using java application. Since we're still on the basic Java, however I tried to make my own, I still cannot. Please!!!! anyone can help me to make …

Member Avatar for Dani
0
142
Member Avatar for macca1979

Hey there, I'm new to java and I need to write a string that i generated in my code to an output file. I'm currently writing the string to the standard output like so : System.out.println("K_"+Receiver+",t"+msgnum+"(R(" +Receiver+",t"+msgnum+"("+out1+")))"); All the types e.g. 'Receiver' or 'out1' are of type string. Could anyone …

Member Avatar for tigerxx
0
92
Member Avatar for tablet

i unable to read a text file into my code i have the right code i think i just can not make it run with no errors

Member Avatar for tigerxx
0
193
Member Avatar for perky_jing

HELP.. I have a frame set to the screen size of my monitor, background color is yellow. I have a panel returned by midFrame() (outerPanel) supposed to be located at the center of my frame. i used the setBounds() to place my panel in the center but it doesn't do …

Member Avatar for perky_jing
0
178
Member Avatar for PeterX

Hi! I can not solve this JAVA problem. I tried to write: final int a=100; int nbr=Input.readInt();// from keyboard I try to find (nbr*nbr)>a ex: nbr=11 and 11*11=121 12*12=144 10*10=100 Output must be 121, not 144 but 144 is also >100 thanks Peter

Member Avatar for nanosani
0
301
Member Avatar for freesoft_2000

Hi everyone, I have a weird problem. I have created a zip manager and unzip manager. The zip manager works alright in a sense that it can create zip files and also the contents of the zip file zipped by my own zip manager can be extracted by using winzip. …

0
64
Member Avatar for Maverick

ok the error is that it doesnt recognize the package class. [code] package celsiustofahrenheit; public class CelsiusToFahrenheit { public static void main(String args []) { double celsius, fahrenheit = 0; System.out.println("\n\tEnter temperature in celsius: "); celsius = MyInput.readDouble(); fahrenheit = 1.8 * celsius + 32; system.out.println("\n\tThat is " + fahrenheit …

Member Avatar for PeterX
0
172
Member Avatar for Typhane20

I'm new to java and i'm taking this java class in I have to create a program that prompts the user to enter his/her high school's name, and two decimal number (ie. 5.8, 3.45). what i have is public class FirstProgram2 { public static void main (String[] args) { System.out.println("Martin …

Member Avatar for nanosani
0
126
Member Avatar for shipwreck

I'm trying to get a 'fish' to move randomly within an aquarium. I've got the fish drawn, but can anybody help me on getting him to move randomly? Any help would be greatly appreciated. -- Shipwreck import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class Fish { public static …

0
114
Member Avatar for gino.laudani

import java.awt.Graphics; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; /* * Created on 14-set-2004 * */ /** * @author Laudani * */ public class ProvaPrint implements Printable { /* (non-Javadoc) * @see java.awt.print.Printable#print(java.awt.Graphics, java.awt.print.PageFormat, int) */ public int print(Graphics arg0, PageFormat arg1, int arg2)throws PrinterException { System.out.println(arg2); if(arg2 == …

Member Avatar for Nichan
0
151
Member Avatar for Nichan

hi all the purpose of this simple codes is to show a text in a text box when i click the button. Both are on in different panel and then placed in one main panel with box layout... actually, i made it a simple case... still, the prob still exists... …

0
75

The End.