32,199 Topics
| |
Write a program to print * / * / * / * / * / * / * / using two child thread. One thread responsible for printing * and another for / | |
[CODE]public class TicTacToe3 { public static void main(String[] args){ } int input = 0, turn = 0, mov = 0; String sq1; int[][] table = new int[3][3]; int play; public void table() { for (int row=0; row < 3; row++) for (int col=0; col < 3; col++) table[row][col] = ((row … | |
[B][I]Write a program that allows the user to display 1, 2, or 4 images in a grid of panels. At program startup, the user is prompted ofr the number of images. If the input number is not 1, 2, or 4, the program quits with an error message. Otherwise, the … | |
[COLOR="red"]Hi every one, I need ur help on this part of my project i cant know to solve it and i done what i can....[/COLOR] the problems are: 1- the time must be update with time of computer but i cant do it just I take the current time??? 2- … | |
Dear all, How do I set particular color in a specific cell in JTable using Netbeans ? I have searched using google but not found any significant answer. Thanks and regards, Nirupam. | |
G'Day Everyone. I was wondering whether someone can help me with my Java project. I have two interfaces, say: Interface1 and Interface2. On both interfaces, there is one JButton. When the Jbutton is clicked, the current window closes and the other one opens up and vice versa for the other … | |
I have a table that outputs certain rows.But they are from different groups and the different groups are stored in different vectors.At present i am adding all the rows using the following code : [CODE] m_vector.addAll(match1); m_vector.addAll(match2); .. m_vector.addAll(matchn); [/CODE] Here match 1 to match n are the different sections.I … | |
how would i keep adding a random integer to the end of an arraylist? the amount of random numbers to be added is not set | |
can u help us to solve this problem ')' expected in line 4 this is my error in this program...pls help me.... [code]public static void removeFile(){ String ans=" "; try{ System.out.print("are you sure you want to delete this file ["my file+"]y=yes/n=no"); ans=stdin.readline().Trim(); if(ans.equals("y")){ if (myfile.exists()){ } myfile.delete(); } else System.out.println("Successfully … | |
import java.util.Scanner; import java.util.Deque; public class MyDeque { private int maxsize; private int [] queArray; private int front; private int rear; private int nItems; public MyDeque (int s) { maxsize = s; queArray= new int[maxsize]; front=0; rear=-1; nItems=0; } public void insertFront(int j) { if (front==0) front=maxsize; queArray[--front]=j; nItems++; } … | |
[CODE] public class TicTacToeGame { public static final int board_size = 3; // number of rows or columns in the board public static void main(String[] args) { char board[][] = new char[board_size][board_size]; // the game board TicTacToeGame p1 = new TicTacToeGame(); // create the players TicTacToeGame p2 = new TicTacToeGame(); … | |
Hi, I have an android application that requests a list of objects from a servlet. The first time I run the android application it works fine by sending the correct list. But when I run the application for the second time, it returns the list that it has already sent … | |
Hi, what does this code exactly do? implements other class to have the same methods, and then compares two objects of x with y and then returns it to back to the other class?? [CODE]import java.util.*; public class TableComparator implements Comparator<customerTable> { public int compare(customerTable x, customerTable y) { return … | |
Hello, i'm having trouble getting this program to work. It works when i just directly put in the file name, but when i try to use args and i pass it threw the command line. i can't get it to work. I've been testing stuff but i can't seem to … | |
| |
Basically I want my program to change the current price of an object with a new one, but I'm having trouble doing so. Here's my code: [CODE] //----------------------------------------------------------------- // Updates the product's price. //----------------------------------------------------------------- public void setPrice(double newPrice) { this.newPrice = newPrice; } [/CODE] [CODE] //----------------------------------------------------------------- // Changes the price … | |
Basically, I have a price quoter that I am working on. The way it should work is: The user selects the quantity of cards from the combo box. In the textfield a price displays once selected. (i.e. 100 = $8.95). (I have this segment working already.) Next the user selects … | |
so all i want to do is roll 1 die repeatedly and add it to a total until the total is equal to or greater than 31 this is what i have got to so far [CODE] import java.io.*; import java.util.*; public class comp { public static void main(String[] args) … | |
Hi, I'm supposed to write a program using super and subclasses to calculate monthly payroll for 5 employees. There are 4 types of employees, salaried, hourly, commissioned, and base plus commissioned. Anyway, I've gotten it to build with no errors and it runs almost like it should but since it … | |
[COLOR="Red"]Hello, I had put this question in another thread and I got a response that seemed to explain it well but I just seem to keep going in circles and I'm still just not getting it. So I need some more help. The other thread started getting pretty lengthy so … | |
Hey Gang; I'm new at this college thing, it's been a while. Need help trying to figure out why I am getting <identifier> errors. Here's my script. would sure appreciate any help you can give. Thanks ///////////////////////////////////////////////////////////////////////////////////// [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TicTacToe extends Frame { … | |
currently writing a program, and for some reason I'm getting these two errors which are really bugging me. I've tried adding the brackets and changing the statement and still no luck. If there is a possible solution that would be grateful. [B]Please note that I have solved the bracket error, … | |
code for saving javascripts info in data base whats the procedure rishi waiting for ur reply<EMAIL SNIPPED> sql server 2005 database vb.net | |
Hello friend... i'm doing a j2me proj it is "banking application on mobile(using netbeans nd mysql database)" as my final yr proj... as i'm a fresher,i hv no clear idea about j2me.....my proj hv following specification. 1.login 2.balance enquiry 3.fund transfer 4.view mini transaction.. I'm able to login user successfully...bt … | |
I am having a problem with my program it has NO syntax errors but when I right click the class the "void main String [] args" option dosent appear so I cannot test my program I have no idea what it wrong PLEASE HELP [code]import java.awt.*; import java.awt.event.*; public class … | |
Like the title says I need help to display a doubly linked list in a forward order. No matter what I do, I can just get it to display in its regular reverse order. Here's the code: [CODE]public class DoubleLinkedList { private Node h; public DoubleLinkedList() { h = new … | |
As the title of the question states, my program is not able to store an integer from a seperate text file provided. For instance, instead of printing the desired output: "$45.00 17 2222 Chuck Taylor All Star" It prints: "$45.00 17 0 Chuck Taylor All Star" So even though I … | |
hi, I'm trying to insert values from a java page in to a mysql db the foll is the code [CODE] i1=st1.executeUpdate("insert into commissiondtls(CompanyCode,BranchCode,LineNo,PartnerCode,CustomerName,InvoiceNo,InvoiceDate,InvoiceAmount,ReceivedAmount,CommissionPer,CommissionPayable,PaymentRef,PaymentDate,InstrumentNo,InstrumentDate,BankName,BankBranch,CommissionPaid,Narration) values('"+CompanyCode+"','"+BranchCode+"','"+commissionDtlsmaxid+"','"+PartnerCode+"','"+CustomerName[i]+"','"+InvoiceNo[i]+"','"+InvoiceDate[i]+"','"+InvoiceAmount[i]+"','"+ReceivedAmount[i]+"','"+CommissionPer[i]+"','"+CommissionPayable[i]+"','"+Paymentno+"','"+Paymentdate+"','"+chequeOrDdNo+"','"+chequeDate+"','"+bankName+"','"+bankBranch+"','"+Amount+"','"+narration+"')throws SQLException"); [/CODE] this doesnot insert values or shows any exception,. what do u think might be the prob? pls help [CODE] public void CommissionDetailsSaveTransaction() { … | |
| In my previous post I asked the forum to help me make a race with an existing program I had made. I figured out a way to do this but now I got an error and I cannot solve it. If you need any additional information just ask ^_^ |
The End.