32,204 Topics
| |
Java n00b here. I am putting together a little random number game and am having trouble with my loss condition test. It seems like Java does not like casting ints as a bools. Here is my code so far: [code=java] import java.util.*; public class TwoRandom { public static void main … | |
I am looking to make my code more abstract so I dont need to repeat the same code. I am storing objects two different classes in the same arraylist. When searching, I need to check ahead of time to see if the entry in question is of a certain class … | |
Hi all! I'm new to Java, so please bear with me. I'm trying to calculate the average of grades input by the user. I keep getting a exception saying that it's dividing by 0. I can't figure out why. [CODE]import java.util.Random; import java.util.ArrayList; import java.util.Scanner; public class Average { // … | |
Is there any possible way to create drop down menu in java? | |
Hey, I'm making a password program for my programming class. If the user doesn't get the password correct in 10 tries, then it says "Your hard drive is erased". (Obviously, it isn't erased). I've been looking for a code to end all programs running and close down everything and can't … | |
I want to implement a file lock using j2ME for mobile files...Can you please help me how to get started with? Can i get files in the emulator? I am using sun wireless toolkit 3.0 to implement it. I am designing it for symbian. | |
Hello. I'm trying to create a traffic simulator using java applet. I've seen a couple of source codes and to be honest, I'm just clearly confused on how to go about it. What I've done so far is paint the image of the road junction that I am trying to … | |
Hi, I'm creating a component for a process flow charting system, and have come to the point where I need to implement D&D between components. I have a panel containing expanding lists, where each list item represents a process definition. What I need to do is the following. Altogether, I'm … | |
Hi all, this is my codes. [CODE]import java.io.*; public class Testing3 { static double[][] mydouble; static int a, b; static double d; static String[] temp; public static void main(String args[]) throws Exception { try { BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Serene\\Documents\\Major Project\\Alignment Algorithms\\Testing2.txt")); //reading files in specified directory String str, … | |
Hi .. anyone can give me a clue about create shortcut path map using java. thanks for advance :) | |
I've looked at this from every angle, but can see nothing wrong. The MS Access table "LocationLinks" contains only 6 fields. LocationLinkKey - autonumber, primary key. LocationKey - long integer, required, indexed, duplicates OK LocationType - string length 4, not required, not indexed RelatedLocationKey - long integer, required, indexed, duplicates … | |
[url]http://pastebin.com/aefXKD9w[/url] This is my code. If the command line csv file (for example, input.csv) has the following: Fred 22 Stella 11 Nellie 33 George 11 Violet 33 Rose 11 Bob 33 Lena 11 Billy 22 1) It should first print Fred is 22 years old.. Stella is 11 years old.. … | |
I am able to present the organizations for a user selected city and state and I am then able to "down select" using the id which presents me with the json encoded data for a single organization. The problem is that along with the json encoded data I am getting … | |
for example: the html file is as fllows: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>HTML form </title> </head> </html> then after the htmlparser the xml file is as fllows: <?xml version="1.0" encoding="utf-8" ?> - <pagestructure> - <pageNodeList> - <pageNode id="0" name="" tagName="html" parentNodeId="-1"> <nodeValue /> </pageNode> - <pageNode id="1" … | |
i need a GUI based java program where size of the frame increases whenever mouse is clicked over the frame.Plz help me | |
the question is: Write a method with the signature: [B]public static void printABs(int n)[/B]that prints all the strings, less than or equal to length n, that can be built from the alphabet A,B. printABs must print out its strings starting from the shortest strings and ending in the longest. So, … | |
Hello everybody, I'm stuck with my Java program. This is the point. When a user had tried for nine times, the user has the choice to restart Hangman or close the program. But when they hit the y or n key during the game, it's just one of the 26 … | |
I am in search of an online exam program which is to be uploaded on my web-site for my project. However, there will be four levels according to which the questions will be grouped. This application should read questions randomly from a list of questions stored in database. This application … | |
i am work on an app where combo box is define in each row of table in a jsp. when i select the specfic color from combo box it is doing the same color on whole row. now i want, when i set the color of each row and submit … | |
Hey guys! I'm back with another problem :( I'm supposed to make a for loop program that will print only EVEN numbers from 77 down to 11. I also need to get their sum and average. By the way here's the code I did: public class Loop_For2 { public static … | |
Hello Everyone, Can anyone tell me the source code for downloading software using Java. Thanks in advance. | |
Is there a way to have a java program resize and use (move mainly) open windows on the desktop? I'm assuming I would need window hooks, but am not sure. I am writing a pong game that uses windows as the paddles and balls, and thought it would be more … | |
import java.text.*; import java.io.*; public class Assignment9 { public static double findMin(double[] numbers, int startIndex, int endIndex) { if (startIndex == endIndex) return numbers[startIndex]; else { double prevMin = findMin(numbers, startIndex, endIndex-1); if (prevMin>numbers[endIndex]) return numbers[endIndex]; else return prevMin; } } public static double computePositiveSum(double[] numbers, int startIndex, int endIndex) … | |
Can anybody help me to do a java awt program in which one frame opens another frame? | |
Hello i want create gui for aria2c( internet download manager ) with java for doing this aria2c has built in xmlrpc. i use xmlRpc to create gui for aria2c. in aria2c support site there is a example code for python programming language that uses xmlrpc [CODE]>>> import xmlrpclib >>> s … | |
Hello I'm trying to make a random number generator to work out probability and chance, although it keeps coming up with an ArrayIndexOutOfBoundsException on line 41(roughly). I would be really greatful if you could help! thx p.s.This is not for school[code]/* * To change this template, choose Tools | Templates … | |
The method below for bubble sort should work, it displays the unsorted array fine, but for the sorted array it only displays one of the numbers. It seems to have just skipped over the other elements in the array. Here is a sample output: [COLOR="Green"]How many random even integers would … | |
guys please tell me why my code for searching in hash for song database after i FFT n calculate hashed point (4 point) keep failing... please help me.. i don't know where i get it wrong this is the code [CODE]private static void search(Hashtable<Long, ArrayList<Integer>> sHash) { NumberFormat formatter = … | |
| |
I just need to make sure that the snippet of code is correct. I don't have all the code as I'm still writing it. If it's possible I need help on the assignment. Maybe clues as to how to do it and maybe point to where I can find the … |
The End.