32,199 Topics

Member Avatar for
Member Avatar for pocku

I'm working on a quick sort algorithm using recursion but it's throwing a stackOverflowError. Here is the code: [CODE] public static void quicksort(int [] A){ quickSortRec(A, 0, A.length-1); } public static void quickSortRec(int [] A, int p, int r){ if (p < r){ int q = Partition(A, p, r); quickSortRec(A, …

Member Avatar for neilcoffey
0
192
Member Avatar for Superstar288

sorry to bother all of you again but i was just wondering if i can use the same arraylist more than 1 time. this is for my project i have to create a gui for a pet store and a pet can be either a : mammal,reptile,fish or bird. so …

Member Avatar for stephen84s
0
178
Member Avatar for Tyster

Hi Folks, I am encountering what I think is a simple problem but I haven't been able to solve it. I am trying to parse a simple XML file and I keep getting the following exception... Exception in thread "main" javax.xml.transform.TransformerException: A location step was expected following the '/' or …

Member Avatar for quuba
0
1K
Member Avatar for PhiberOptik

Hey guys, I have a program that I want to launch and pass a parameter. For example: [QUOTE]"C:\Program Files\aProgram\test.exe -login joeSmith password1"[/QUOTE] The thing is I can't just add that to a shortcut because lots of other people will be using this computer as well. Is there a way of …

Member Avatar for neilcoffey
0
85
Member Avatar for Sereal_Killer

I have a basic problem i dont know where the error lies. i can create a class Persoon and fill in all its values before its created . but for some reason when i call up the information i get the current Date as the birthdate and not what i …

Member Avatar for neilcoffey
0
111
Member Avatar for PhiberOptik

Hey folks, I have come upon what seams to be a very basic problem, but I have read my text book over and over and I can't figure out how to write to a specific line of a text file. For example each line of my text file looks like: …

Member Avatar for PhiberOptik
0
254
Member Avatar for Superstar288

hi i was doing some work for my project in a gui and i wanted to print out the information in my arraylist but when i do print out the object all i get is Customer@197d257 i have used the follwing code to print it out of my iterator [CODE] …

Member Avatar for Superstar288
0
129
Member Avatar for robertmacedonia

Hi, I have this little program with two classes in it. The first class Kontakt (Contact in english) contains information about a person (name,surname and number). Now, in the PhoneBook class I am trying to implement a LinkedList <Kontakt>, i.e. a list of contacts. Now, all the methods work fine, …

Member Avatar for robertmacedonia
0
282
Member Avatar for clueless101

[QUOTE]I'm working on a seemingly simple application that has 2 text fields and a slider. In the 1st text field the user enters an amount and the associated sales tax is displayed in the 2nd text field. Then, by moving the slider up and down the specified range, the user …

Member Avatar for stephen84s
0
184
Member Avatar for localp

i want to display a PDF file in a JFrame .. how do i code it, can some one send me the code for this.. i googled, it but couldn't find any .. plzz help me

Member Avatar for stephen84s
0
527
Member Avatar for robertmacedonia

Hello, I'm new in Java programming, just learning it and I want to ask you about the Exceptions. As much as I understood, I just need to create a class e.g. "MyException" that extends the Exception class, and use the exception specification "throws" in the function that might throw the …

Member Avatar for Tyster
0
143
Member Avatar for programmingme

My program keeps looping when asking for seat letter. Can anyone help me out as to why that is? [CODE] import java.io.*; import java.util.*; public class AirplaneSeating { static Scanner console = new Scanner(System.in); public static void main(String[] args) throws IOException { char[][] seatPlan = new char[13][6]; char response; initializeSeatPlan(seatPlan); …

Member Avatar for programmingme
0
142
Member Avatar for l_03

help guyz...our teacher recommend us to download the "source code" of eclipse. jcreator, net beans, and bluej,,, i am either confused,,,,what are the source codes of this four????are these the .java file???help guyzz,.....i cant seem to find their source codes since i dont even get the idea of what are …

Member Avatar for jbennet
0
117
Member Avatar for puneetkay

Hello everyone, Im trying to write Punjabi (Gurmukhi) by Unicode. I have the Unicode code point of all character and Code Block is Gurmukhi. [CODE=java]System.out.prinln("\u0A73")[/CODE] u0A73 = GURMUKHI URA = ੳ but its showing "?". then i tried with PrintStream [CODE=java]String unicodeMessage = "\u0A73"; try { PrintStream output = new …

Member Avatar for puneetkay
0
285
Member Avatar for goodluck4287

Just got the wonderful Line is longer than 80 characters error. I realize this could very well be a n00b question ;-) I tried splitting after the ":" putting both lines in brackets and connecting them with + " but didn't work well for me, anyone know how? [CODE] public …

Member Avatar for stephen84s
0
75
Member Avatar for clueless101

[quote] Once again, I can get part of my code to work, but not all. When the user inputs more than one sentence [I](ending with either a period, question mark or exclamation point), [/I]each sentence should be capitalized accordingly. However, it only works with the first sentence to work. Does …

Member Avatar for ~s.o.s~
0
125
Member Avatar for l_03

guyzz...do you know best tutorial in JOptionPane??especially with their dialog features,,,i really want to make a program,,that can be look a like as GUI Application,,,using only JOptionPane...i hope you can help me guyzz....thank you...

Member Avatar for stephen84s
-1
105
Member Avatar for Sgtplank

hey guys, ok ive got a program ive got to hand in fast, practicaly works just got to errors so a quick reply would be greatly appreciated. [code=java] import java.util.*; import java.io.*; class Assignment7{ public static void main(String[] args)throws Exception{ File input1 = new File (args[0]); File input2 = new …

Member Avatar for Ezzaral
0
113
Member Avatar for it2051229

I'm creating a java program that in every second there is a data stored into my table. I made use of THread.sleep(1000) to pause the for loop in every second.. But when my program runs, it freezed for 10 seconds because of the condition of my for loop where the …

Member Avatar for Ezzaral
0
92
Member Avatar for ezkonekgal

i am trying to write a code that stimulates an simple ATM. i have two class, one for the Bank Account and another for the ATM itself. [code] public BankAccount(String name1, int acctNum, int pinNum ){ name = name1; accountNumber = acctNum; pinNumber = pinNum; balance = 100.00; } public …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for Generalcoco

This is my Final Project and as you can see my program asks the users twice for the test grade I am trying to consolodate and have the program only ask for the test score once and give the letter grade at the same time.? any ideas I do not …

Member Avatar for Generalcoco
0
87
Member Avatar for oldSoftDev

I just started java installed everything that I was required. I just completed my python class. for just trying a java code I tried this code. code: [code=java] /** * This program lets the user play HighLow, a simple card game * that is described in the output statements at …

Member Avatar for jbennet
0
136
Member Avatar for das_das

hello there are 19+ sets of Mock test for SCJP 6.0 and SCJP 5.0 available at [[link removed] It is help full for all so i am putting here ... I am not the owner of the website ..

Member Avatar for verruckt24
0
82
Member Avatar for tsr_tvsk

Hi everybody. here i have a problem with hashtable. i am storing hashtable in session scope and i want to validate that hashtable with javascript in next jsp . how suresh kumar

Member Avatar for stultuske
0
44
Member Avatar for zikojam

Hello The table's cells contain integer values. I would like to save each one of theme them in an array of integers. The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages. I tried something like: [CODE]Object …

Member Avatar for stultuske
0
66
Member Avatar for clueless101

I'm working on a simple matching game, whereby my array includes 3 numbers:{ 5,9,0 } and the user tries to guess them. Instead, I want to use the Random class to generate 3 different numbers from 0-9, but I'm not sure how or where to start. I came across info …

Member Avatar for VernonDozier
0
92
Member Avatar for Narayan15

i have installed Jdk6.0 version, this doesn't contain smack package. here i have written a programme import java.util.Collection; import org.jivesoftware.smack.*; public class GtalkClient { public static void main(String[] args) throws XMPPException { ConnectionConfiguration config = new ConnectionConfiguration("talk.google.com", 5222, "rgukt.in"); XMPPConnection connection = new XMPPConnection(config); connection.connect(); connection.login("< narayana.nuz >","< narayanramlall >"); …

Member Avatar for ~s.o.s~
0
320
Member Avatar for Grub

Hi It is possible to execute terminal commands in java, but is it possible to then get the output or result of the terminal command as input into a java program? If so, may someone tell me how or point to materials that I can read. Many thanks

Member Avatar for Grub
0
190
Member Avatar for BestJewSinceJC

If I have a hash function h(k, f(i)) and f(int i){ return c * i; } And the first index that it tells me to insert the element at already has an element there, what do I do? Would the proper way to insert an element the first time be …

Member Avatar for BestJewSinceJC
0
244
Member Avatar for Aamit

category table id name date duration 1 aaa 12/12/07 1 2 bbb 10/10/08 1 ......... user_table id name date 1 aaa 12/12/07 2 bbb 10/10/08 ....... rating table id user_id name rating date 1 7 aaa 4 12/12/07 2 8 bbb 3 10/10/08 write now i am displaying these user …

Member Avatar for masijade
-1
304

The End.