32,199 Topics
| |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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] … | |
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, … | |
[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 … | |
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 | |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 .. | |
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 | |
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 … | |
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 … | |
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 >"); … | |
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 | |
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 … | |
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 … |
The End.