32,199 Topics

Member Avatar for
Member Avatar for whitewraith

public class DebugFour3 // This class uses a FixDebugBox class to instantiate two Box objects { public static void main(String[] args) { int width = 12; int length = 10; int height = 8; FixDebugBox box1 = new FixDebugBox FixDebugBox box2 = new FixDebugBox(width, length, height); System.out.println("The dimensions of the …

Member Avatar for coil
0
126
Member Avatar for Stein102

Okay, so i need help getting a value from a variable in one class's method. I want to use that data in another Class's method. Heres what i mean... [code=java] public class RoomType{ public String N(String[] args){ Scanner scan = new Scanner(System.in); String opt = ""; int x=1; do{ opt …

Member Avatar for coil
0
156
Member Avatar for ezkonekgal

Hello. Anyone familiar with the Halstead product metrics? we are going to implement it. and again i need some help. here is our algorithm: 1. The user runs the program. 2. The program will ask the user to browse the file he/she wants to be evaluated using the programer's own …

Member Avatar for jon.kiparsky
0
649
Member Avatar for TheWhite

so, lets say I have a thread that looks like this: [CODE=java] public run() { boolean active = true; while (active) { //do some action that takes a really long time } } [/CODE] Is there any way I can directly stop and destroy this thread in the middle of …

Member Avatar for ~s.o.s~
0
151
Member Avatar for tallygal

The question is: Write a code that will take and inches input and convert it to mm. Then display the same result using m, cm, and mm. Example would be: Input: 53 inches Output: 1346 mm OR 1 m 34 cm and 6 mm Something is happening with the remainder …

Member Avatar for coil
0
160
Member Avatar for TahoeSands

I found some code that does something that interests me, but I don't fully understand the implementation. The part I am struggling with is where the author "overrides" an "actionPerformed" method. I have a vague idea of why someone would want to override a method that is inherited from the …

Member Avatar for NormR1
0
381
Member Avatar for APatrizio

Just because security holes and vulnerabilities get reported to software vendors doesn't mean they are actually patched. A new report from IBM's X-Force security team found that of all the software holes reported in the first half of this year, more than half are still unpatched. IBM's X-Force report is …

Member Avatar for josephadeo
0
534
Member Avatar for arntb0rnprgrmr

Goodeve guys... please help me on how to start a java game.. we have a proposed game and mine is a song lyrics game.. this is our project for the finals and honestly, i'm not that good in java.. :C what should be the first step? what is the best …

Member Avatar for VernonDozier
0
197
Member Avatar for subrat_p

I tried a lot to open a JAR file but it is not opening.I typed in command prompt javaw -jar MyJar.jar but it is not open. It makes some error sound bt not open. Please help me regard this

Member Avatar for Ezzaral
0
173
Member Avatar for Jiblix

Hey guys, I'm a newbie programmer and I'm trying to create a program which calculates BMI. Weight is in lbs and height is in inches. I've compiled this and its got quite a bit of errors, so I could really use some help. The final result that I'm trying to …

Member Avatar for Jiblix
0
913
Member Avatar for NewOrder

the class is the same. but there are two methods: first method: if simply returns a string. [CODE]public String FindPiece(String chessPiece) { return name; } [/CODE] name. is a constructor variable. it is a name of the chess piece [CODE]public Pawn(String name){ this.name=name; }[/CODE] second method public boolean isMoveValid(ChessPiece[][] pieces, …

Member Avatar for NewOrder
0
93
Member Avatar for hoppy9

Hello All, I am student just starting Java. I do need help with swing - GUI. I am creating 4 textfield that accepts input from 3 user and will display as a 2D Array in the text area. As well as calculate the average of one column from the input. …

Member Avatar for NormR1
0
494
Member Avatar for bino87

im tyinh to writ a program to calculate nd display the volum ,area as well as the area of 6 sides of the rectangular prism but im stuck lol im a beginners import java.util.Scanner; public class RectangularPrism { public static void main(String[] args) { int length; int width; int height; …

Member Avatar for robertmacedonia
0
347
Member Avatar for robertmacedonia

OK, so I want to thank all of you that helped me with my little problems within the past few days,I have almost come to the end of this project thanks to your suggestions. Now the thing is, I used ObjectInputStream & ObjectOutputStream to write down whole objects to a …

Member Avatar for robertmacedonia
0
2K
Member Avatar for abby2589

private static void randomNumber() { int rand; int min = -10; int max = 10; System.out.println(" "); for (int i = 0; i < 10; i++) { rand = (int) (Math.random() * (max - min + 1) ) + min; System.out.print(" " + rand); } System.out.println("\n"); } can anyone explain …

Member Avatar for extemer
0
202
Member Avatar for seanooi

I have a problem outputting the contents of a text file. Whenever I try to display the contents of a file a "null" word is printed at the end of the output. Any help would be deeply appreciated. [code] import java.io.*; import java.lang.*; public class prog1 { public static void …

Member Avatar for javaAddict
0
215
Member Avatar for smoothe19

Here is what i currently have; the instructions are a bit vague so i am confused on what to do beyond this...any help will be tremendous! This is my 2nd week in java so please understand i am not an expert [CODE]public abstract class TestQuestion { protected String question; protected …

Member Avatar for javaAddict
-3
339
Member Avatar for patilsunil47
Member Avatar for nikita.chandra

hi ! please tell me how to navigate from 1st record to last record and also from last to first record of database using JDBC , Servlet and jsp. please help me by sending full source code for that. thanks :)

Member Avatar for ~s.o.s~
0
80
Member Avatar for mahdi68

Hi is it possible active touch support on high level item`s(form , list , ... ) ? thanks

Member Avatar for mahdi68
0
150
Member Avatar for madhub2v

pl help me I want Single File Database: Develop a student record management program, which uses single file as its database. It is not supposed to create additional files at any part of the project and should never rewrite total content.

Member Avatar for masijade
0
113
Member Avatar for sky_B

Hi,I'm a beginner to Java. Can anyone help me? I want to know how a textField to be displayed above a image(like acting as the background of that textField).

Member Avatar for sky_B
0
86
Member Avatar for brandongood

Hello, I have a class that pulls account numbers from valid_accounts.txt and is supposed to take each number and put it into an array. In my driver program, I should be able to call the method of the class that pulls the information and populate it into my array created …

Member Avatar for Ezzaral
0
118
Member Avatar for chris12047

Write an application to simulate the rolling of two eight-sided dice (eight-sided dice are used in various role-playing games). The application should use an object from the class Random to roll the first die and then again to roll the second. Each die can have the values of 1 to …

Member Avatar for NormR1
0
184
Member Avatar for blknmld69

Good day everyone! I have a program that I need to modify so that it reads a list of valid charge account numbers from a file. Currently the list is in an array in the program. I am also attaching the text file(valid_accounts.txt) that it needs to read from. [CODE] …

Member Avatar for coil
0
161
Member Avatar for anuj6928

hey... hi there .. i m currently using NetBeans for creating A simple desktop application in java,,,, so in the registration page.. i m getting some errors my code is import java.sql.*; import java.lang.*; /* * register1.java * * Created on September 7, 2010, 10:59 AM */ /** * * …

Member Avatar for coil
0
159
Member Avatar for NormR1

For those that want to directly execute a .class file in a command prompt window. Here is a way: Create the following batch file. Use the Windows Explorer Tools to add a commandline for the .class file: C:\BatchFiles\ExecClass.bat "%1" Give it a name like: Execute class file The batch file …

0
631
Member Avatar for nikita.chandra

hi all ! i have installed eclipse through internet on my PC (OS : ubuntu) but there is no any option in eclipse to create web application using java. Please help. It's very urgent. Thanks! :)

Member Avatar for Ezzaral
0
75
Member Avatar for stusfella@yahoo

Hi guys, I am starting my project and thought You pple could give a hand.I want to develop a stand-alone [I]real property management system[/I]in Java (netbeans platform)...I have some problems in [B]design and content of the system[/B].I would greatly appreciate any assistance on the same ..no of databases(mysql),forms and such..(design) …

Member Avatar for new_programmer
0
89
Member Avatar for daudiam

The following assignment would work [CODE]float a=3;[/CODE] But the following won't :[CODE] Float a=3;[/CODE] Shouldn't 3 be automatically promoted to float (as widening conversions don't require an explicit cast) and then Boxed to Float type ? Is it because of a rule I read in Khalid Mogul's Java book ? …

Member Avatar for daudiam
0
127

The End.