35,618 Topics
![]() | |
[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 … | |
please help me, in applet.. how to make a square..? and how can i move it..like a rectangle movement..? ![]() | |
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.. | |
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"); … | |
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 … | |
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 … | |
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 … | |
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... … | |
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 && … | |
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; … | |
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 … | |
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 … | |
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; … ![]() | |
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 … ![]() | |
[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 … | |
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? | |
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 … | |
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] | |
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 … | |
please send me the whole code of java wed site | |
[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 … | |
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 … | |
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 … | |
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){ … | |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
how to forward the item selected in the combo box instead of the value, to a jsp page. | |
Can somebody help me what to do to place tables in gui? | |
hi, iam developing sample exam application. i want to get one by one record when i click next button. plz... give reply to this. | |
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 | |
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 … |
The End.