32,199 Topics
| |
Hi Folks, I have a general question about multithreading... I have a small app that is multithreaded. I have a main() class and a separate Runnable class that implements the Runnable interface. The problem I have is that the Runnable class needs to return an integer to main(). But this … | |
I am to design an applet that produces a six sided polygon in which the coordinates are set according to the location of the mouse when it is clicked. I am struggling setting each of the clicks to the correct point. I have tried many things, however have not been … | |
Hey guys, So I'm on the second last question of my latest homework assignment and I can not figure out what is wrong. Basically it asks you to input a date, name, amount and then prints out a check, with a word form of the name on the bottom. Well, … | |
Hai Friends, I doknow how to store a particular data in mobile using j2me, i want to retrieve stored data while opening the application next time. is it possible in J2ME. plz help me for this problem. | |
Hello, I'm creating a simple voting program. Everything works apart from that the program wont calculate the % total of votes for each candidate. It displays each candidates percentage as 0.00%. I've tried everything to see why it does this but I'm fooled :( [code] import uulib.*; public class Candidates … | |
so heres the issue im having. i have this class that im suppose to make for a tester class. i have to declare an array of string at the class level. there is method call to read the context of a file and put into the array. the problem im … | |
I had a problem w/ efficiency - The problem was that using String concatenation was inefficient for large text files, when reading the whole file into the String. I've since thought about it, and I guess this is because Strings are immutable - so every time concatenation is done, a … | |
I need to make a seating reservation system for my assignment and I have to manage .dat files. I have to store all Student objects in a file. When a student is registered, a new object is created and I need to add it to the archive. But as far … | |
Hi guys, I'm new and I'm totally stuck on a question for class! Basically we have to get the user to enter a few sentences and then change the first letter of every sentence to a capital version. I'll post my code below. (I'm not asking for the answer just … | |
I'm having trouble with storing bits as a byte. I've read probably 30 different sources about this already. I'm doing Huffman Compression. Lets say I read in the character "c" and I am supposed to output "1010". How would I go about doing that? I know how to write bytes … | |
in th following code, i cant use a Text Field in the actionPerformed methode .. the textFiled is declared outside that method. i get the following error: Cannot refer to a non-final variable serverHostField inside an inner class defined in a different method How can i solve this??? Thank you … | |
Hi, ive got to make a program to find the perimeter and area of a triangle made using vectors, and i have not a clue, ill post the code i have done so far and if any1 could give me the code for the area and perimeter you would be … | |
Can someone please help with this project of mine? I am not really good at GUI... create a new account, check account status. and make purchase with a credit card. Create a New Account You must ask the user to input some information: applicant's name (e.g. "John Smith"), application date … | |
is there a way to access a mysql server or a php script using java to verify a username and password? | |
I'm trying to create a simple program that will check for any given number (an ID) provided by the user and check this ID with an array of numbers inside my program. If the correct ID is given, it will display "Valid ID" if the ID provided by the user … | |
I am trying to write a program that will monitor my routers and servers and notify me when they go down. I am looking for a way to ping the host and read the reply. The InetAddress.isReachable method is the only thing i could find but it uses the echo … | |
Please help me with a simple watch program. In the program,I have to display on the same line. i have written the following code which is not working. pls look into it [code] class watch { private int h,m,s,a=0,b=0; public void calc() { for(;a==b;s++) { if(s%60==1) { m++; } if(m%60==1) … | |
Hello, i'm working on netbeans and want to access my database using this code: [CODE=java] import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class connect { /** * @param args */ public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (Exception ex) { System.out.println("error \n"); … | |
hi, is session_id is generated by javapage in one website is equal to session_id generated by phppage????.because i integrated php pages to java pages in that website. so i maitain session based on that java page. is this possible to session_id from java page to php page, if i get … | |
can anyone send me the javascript material or any link for material? | |
basically i have a 3d array of chars, i need to be able to save and load it using text files. Any as to how i would actually do it? Im familiar with reading lines using BuffererdReader and stuff. Im thinking use a loop to save each element to a … | |
error message cannot find constructor `lottery(int[])` import java.util.Random; public class Lottery { private final int NUM_DIGITS = 5; private int[] lotteryNumbers = new int[NUM_DIGITS]; private int[] userNumbers; private int matches; public int[] getLottery(int[] l) { // Create an array the length of l. lotteryNumbers = new int[5]; // Random object. … | |
Hi guys, i've a problem when running java application connected with sqlite database the connection is done with netbeans IDE, but when i trying to run the application i get the following error [COLOR="Red"]init: deps-jar: compile: run: 06/12/2008 04:42:49 ص org.jdesktop.application.Application$1 run [COLOR="Green"]SEVERE: Application class desktopapplication3.DesktopApplication3 failed to launch javax.persistence.PersistenceException: … | |
hi, i'm trying to reference a class outside the current working package how to reference this class to create an object??? | |
Alright, so for the output: 0 2 4 6 8 10 1 3 5 7 9 11 3 6 9 12 15 18 6 10 14 18 22 26 ... (the pattern presented goes on forever) a code must be written to create it. I know I need a for … | |
please any body know and explain Abstract class and Interface ? | |
hai friends, I want to import a photo from server machine to client through java..s there any way to import that.. Thanks in advance | |
I need help with this code. it's basically a lotto program, but I only need to know how to get the 1st number right to do the rest. the user needs to be able to enter a number between 0 and 55. The program has to send an error message … | |
Hi everyone! My problem basically boils down to this: I have 71 items, and each item can be either on or off. I need to consider all the combinations (permutations?) and go through a 100 for loop for each of the 2^71 scenarios...on the scale of 10^23. Two questions: [CODE]1) … | |
Okay so this is the deal. I want to make a call to a routine that replaces all of one certain type of integer with a number. I have it to where it is replaceing the first, however, it misses the tail node.[ICODE] public static SimpleList<Integer> replaceAll(Integer old, Integer nEw, … |
The End.