35,618 Topics

Member Avatar for
Member Avatar for kandyhyatt

[CODE] 1. /* 2. * Program: Chapter 3 Lab 1 - Programming Project 8 on page 164 3. * 4. * This program caculates the solution to the cryptarithmetic 5. * puzzle TOO + TOO + TOO + TOO = GOOD where each letter represents 6. * a single digit …

Member Avatar for brandonrunyon
-2
122
Member Avatar for cirvelasares

please help me, in applet.. how to make a square..? and how can i move it..like a rectangle movement..?

Member Avatar for coil
0
62
Member Avatar for madhub2v

Hello Friends. I want to install Tomcat and struts into my system. I hava downloaded apache-tomcat-7.0.2 , unpacked it. i dont know how to install it. I did as instucted in the RUNNING.txt. But i am unable to run Tomcat server. Please help me..

Member Avatar for peter_budo
0
100
Member Avatar for FNHA

I'm writing a deque implementation with ArrayList as required by my instructor. So far the body of the class looks like this [code=java] try { while (!endOfFile) { character = inputFile.readChar(); while (!character.equals('\u0003')) { if (character.equals('\u0008')) deck.removeBack(); else deck.addToBack(character); } } while (!deck.isEmpty()) { character = deck.removeFront(); if (character.equals('\u0003')) System.out.print("\n"); …

Member Avatar for FNHA
0
141
Member Avatar for Loveday

Good day all! Please I need someone to help me out by telling me what or how will I call up an Applet from a separate Java file that has a main method in it...thats to say, I will compile and run the Applet code from the other class with …

Member Avatar for NormR1
0
2K
Member Avatar for jackcfj0129

Write a program that lets the user enter loan amount and loan period in numbers of years and display the monthly and total payments for each interest rate starting from 5% to 8%,with an increment of 1/8. Your program should have at least [b]2 methods[/b],method for calculation and method to …

Member Avatar for tong1
0
1K
Member Avatar for LianaN

Hi! I'm developing a simple file manager. So, I have two components: JTree & JTable. When I open some folder in JTree, then JTable is updated according to the content of that folder. JTable contains 3 columns: file_type, file_name, file_bytes. The code works correctly. Now I need to add some …

Member Avatar for JamesCherrill
0
94
Member Avatar for hulk33597

i am making a project on speech recognition and i want to integrate it with window. i can open the active window by runtime class by voice but can't close that active window by voice .. like how can i invoke alt-f4,back_space and other special key for window without keypess... …

Member Avatar for peter_budo
0
128
Member Avatar for NewOrder

i want the array to run from one place in diagnol to another place in the array. i set the arguments. here they are [CODE] int rowStart=3; int rowEnd=5; int columnStart=3; int columnEnd=5; int columnX=columnEnd-columnStart; int rowY=rowEnd-rowStart; [/CODE] here is the single loop that i prepared: [CODE] if (rowY>0 && …

Member Avatar for NewOrder
0
105
Member Avatar for daudiam

Forward referencing is allowed during declarations when the undeclared variable is used in the LHS of an expression, but not if its in the RHS. Therefore, the following won't work : [CODE]class A { int a=h; int h; }[/CODE] But the following code works : [CODE]class A { int a=this.h; …

Member Avatar for daudiam
0
225
Member Avatar for daudiam

Is it true that during autoboxing, the type.valueOf() method is called (which creates a new object only if another with the same primitive constant is not in the intern list. This applies to cases where interning is allowed. Otherwise, it creates a new object using new() ). Is this right …

Member Avatar for daudiam
0
141
Member Avatar for PDB1982

I can't seem to get my counting loop to stop if m OR n are <=500. The loop stops only when m hits 499 right now, but I need it to cancel if n is 499. I have tried using a break statement, but I'm not sure what else to …

Member Avatar for jon.kiparsky
0
152
Member Avatar for Protoroll

In my tree class the user can set the fall color of whatever tree they choose, but it's not taking the colors I type in when I test it. [CODE]import java.awt.Color; public class Tree { private String treeSpecies; private int treePrice; private Color currentColor; private Color fallColor; private int treeAge; …

Member Avatar for coil
0
129
Member Avatar for flyingcurry

We have an assignment to write a program finding the nth Fibonacci number. On the web, there are some standard mathematical equations for this, but that would just defeat the purpose of this assignment if I use those formulas. I have my current code down here(with some sketchy back up …

Member Avatar for coil
0
1K
Member Avatar for blknmld69

[CODE] import javax.swing.*; // Needed for swing classes import java.awt.event.*; // Needed for the action listener import java.io.*; // Needed for the file and IOException import java.util.Scanner; // Needed for the scanner class import java.util.List; // Needed for the arraylist import java.util.Arrays; // Needed for the arraylict class /** This …

Member Avatar for peter_budo
0
231
Member Avatar for plasticfood

particularly from a txt file. for example if the file reads "name ###-####-#### address" all in one single line. how do i put all three items in three separate variables and print them?

Member Avatar for CrazyDieter
0
132
Member Avatar for menacingsprite

So I'm trying to build this program for class and the teacher didn't really show us how to do it and is leaving it up to us to figure it out. The directions are as follows: The program will input the divers name, the scores of the 5 judges, and …

Member Avatar for CrazyDieter
0
204
Member Avatar for shruti1210

Is the following code snippet show valid inheritance? [code]class A { int v; final String sayHello() { return "Hello"; } } class B extends A { public int sayHello(int a) { return 3 + a; } }[/code]

Member Avatar for JamesCherrill
0
79
Member Avatar for LianaN

Hi! I would like to add ActionListener to buttons stored in JToolBar. However, if I'm using the code bellow, then I could add only MouseListener ("addActionListener" doesn't work). So, is it possible to somehow add ActionListener? Thanks a lot! [CODE] JToolBar toolBarUpdateDocs = new BrowserToolBar(); toolBarUpdateDocs.setFloatable(false); toolBarUpdateDocs.getComponent(i).addActionListener(new java.awt.event.ActionListener() { public …

Member Avatar for LianaN
0
318
Member Avatar for mishra pradeep
Member Avatar for daudiam

[CODE]class hello { } class hello1 { public static void main(String aa[]) { hello ob[]={new hello(),new hello(),new hello()}; hello ob1[]=ob.clone(); // 1 } }[/CODE] ob is an array which is also treated as an object, and hence has a default clone method which is called at (1). But the default …

Member Avatar for daudiam
0
228
Member Avatar for justinwarner

Hey guys, So, I need to add booleans on my project for the final piece. I have all of it done but the booleans. Basically, I checked about 10+ links on google, and none of them really explained how to do booleans. So, what I need is something that does …

Member Avatar for ~s.o.s~
0
150
Member Avatar for ncstplaya1234

Hey guys, I'm trying to create a program that has three items and adds the cost of the three items and prints the final total with sales tax. I need a subtotal, sales tax, and total amount. I'm having a problem getting the program to calculate the quantity correctly and …

Member Avatar for ncstplaya1234
0
3K
Member Avatar for NewOrder

i understand what the code does. but i dont understand a few lines: [CODE]package il.co; public class LinkedListEx2 { public static void main(String[] args) { LinkedList list=new LinkedList(); list.add(new Car("BMW", 150000)); list.add(new Car("SUBARU", 60000)); list.add(new Car("TOYOTA", 58000)); list.print(); } } class LinkedList{ private Unit head; public void add (Car data){ …

Member Avatar for adams161
0
134
Member Avatar for amit.hak50

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Member Avatar for amit.hak50
-1
73
Member Avatar for pin2jay

how to forward the item selected in the combo box instead of the value, to a jsp page.

0
52
Member Avatar for Simplelyn
Member Avatar for prasannakumarp

hi, iam developing sample exam application. i want to get one by one record when i click next button. plz... give reply to this.

0
45
Member Avatar for manishanibhwani

i m unable to interrpret my package from any other drive???? i mean ..i hav created my package, compiled it bt unable to run it... can anyone tl d way of running it or setting the path... the coding is done in command prompt

Member Avatar for NormR1
-1
96
Member Avatar for codeFaceMcGee

I know that it's a very undesireable scenario, but I need to create a database straight from java code. Yes, a database. Not a table. A database. The database will be dropped at the end of the program and will never be directly touched by the user, so all I'm …

Member Avatar for codeFaceMcGee
0
622

The End.