32,204 Topics

Member Avatar for
Member Avatar for optikali

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 …

Member Avatar for optikali
0
179
Member Avatar for BLUEC0RE

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 …

Member Avatar for BLUEC0RE
0
139
Member Avatar for hwalsh

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 { // …

Member Avatar for Overbooked
0
2K
Member Avatar for Pushpasheela
Member Avatar for jon.kiparsky
0
186
Member Avatar for caswimmer2011

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 …

Member Avatar for haranaboy
0
155
Member Avatar for kanchan arak

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.

Member Avatar for kanchan arak
0
146
Member Avatar for shakssage

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 …

Member Avatar for shakssage
0
1K
Member Avatar for lee.j.baxter

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 …

Member Avatar for kramerd
0
224
Member Avatar for Sunshineserene

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, …

Member Avatar for Sunshineserene
0
2K
Member Avatar for hiks

Hi .. anyone can give me a clue about create shortcut path map using java. thanks for advance :)

Member Avatar for kramerd
0
120
Member Avatar for StevePrim

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 …

Member Avatar for StevePrim
0
984
Member Avatar for minimi

[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.. …

Member Avatar for javaAddict
0
185
Member Avatar for Capt Spaghetti

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 …

Member Avatar for Capt Spaghetti
0
125
Member Avatar for luoyi2008061424

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" …

Member Avatar for leiger
0
192
Member Avatar for koushikG

i need a GUI based java program where size of the frame increases whenever mouse is clicked over the frame.Plz help me

Member Avatar for hanvyj
-2
142
Member Avatar for wobuaini

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, …

Member Avatar for leiger
0
95
Member Avatar for MeandJava

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 …

Member Avatar for leiger
0
7K
Member Avatar for orkuncanbay

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 …

Member Avatar for orkuncanbay
0
180
Member Avatar for vij123

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 …

Member Avatar for masijade
0
105
Member Avatar for spades0001

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 …

Member Avatar for apines
0
145
Member Avatar for Guna16

Hello Everyone, Can anyone tell me the source code for downloading software using Java. Thanks in advance.

Member Avatar for jon.kiparsky
-2
71
Member Avatar for waldchr

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 …

Member Avatar for leiger
0
73
Member Avatar for RBK_RBK

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) …

Member Avatar for jon.kiparsky
0
96
Member Avatar for koushikG

Can anybody help me to do a java awt program in which one frame opens another frame?

Member Avatar for javanub123
0
96
Member Avatar for thr

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 …

Member Avatar for leiger
1
624
Member Avatar for yup790

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 …

Member Avatar for leiger
0
176
Member Avatar for flyingcurry

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 …

Member Avatar for apines
0
176
Member Avatar for techny.color

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 = …

0
84
Member Avatar for Dhruv Gairola
Member Avatar for Lxyslckr

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 …

Member Avatar for Eric Cute
0
209

The End.