32,204 Topics
| |
I filled the data to each field in the Student Form, Then I click the Add button, Finally display the error message. "Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet." I created stu databas, student table. | |
Hi Everyone, I am playing around with some Java following some tutorial online and ran into a problem that I cant seem to figure out. In the code below, inside of the groupButton method I get the error 'JRadioButton1,JRadioButton2 and JRadioButton3 cannot be resolved to a variable'. Can you please … | |
i write a program its output is below G:\Java\Multithreading>java NewThread Child Thread Thread[main,5,main] Main Thread 1 Child Thread 1 Main Thread 2 Main Thread 3 Main Thread 4 Main Thread 5 Main Thread Complete Child Thread 2 Child Thread 3 Child Thread 4 Child Thread 5 Child Thread Complete in … | |
error: no suitable method found for toArray(int[]) return intList.toArray(new int[intList.size()]); ^ method Collection.<T#1>toArray(T#1[]) is not applicable (inference variable T#1 has incompatible bounds equality constraints: int upper bounds: Object) method List.<T#2>toArray(T#2[]) is not applicable (inference variable T#2 has incompatible bounds equality constraints: int upper bounds: Object) method AbstractCollection.<T#3>toArray(T#3[]) is not applicable … | |
Hello Everyone i am new in java language. and iwant to hide any <div> tag on my site site example: 'www.mysite.com' and i have a div in my website. like <div id='header'> when we load my site the java script run and check my site url. 'www.mysite.com' if the url … | |
Below is a two dimensional array ineteger variable. int[ ][ ] value={{1, 2, 3, 4 }, {5, 6,7}, {8, 9}, {10}} please write a java code that can print the values and sum the column values as shown below: 1 2 3 4 5 6 7 8 9 10 Sum … | |
I have to create a program that will calculate the the average miles per tank and the cost to fill tank of a car. The inputs are tank capacity, miles per gallon, and price per gallon, the outputs are average miles per tank and cost to fill tank. I have … | |
I have the following code: import java.util.Scanner; public class WhileLoop { public static void main(String[] args) { int number; int maxValue = Integer.MAX_VALUE; int minValue = Integer.MIN_VALUE; Scanner input = new Scanner (System.in); System.out.println("Enter the length of numbers"); int loop = input.nextInt(); for(int i=1; i<=loop; i++){ System.out.println("Enter a number: "); … | |
hello i have a problem with Priority when I set priority of any thread then I get wrong output my code is below class Run implements Runnable{ private String st; public Run(String s){ st=s; } public void run(){ for(int i=1 ; i<=10 ; i++){ System.out.println(st+"="+i); } } } class PriorityCheck{ … | |
Hello, So I basically loaded to 2 keys and I want to verify them after I've signed something with one of them, but I a having difficulties. I am getting verified: false at the end without any error. Can someone please point out the flaw? package fliesigning; import static fliesigning.FlieSigning.verifySig; … | |
import java.util.Scanner; import com.sun.speech.freetts.VoiceManager; import com.sun.speech.freetts.Voice; public class TextToSpeech { public static void main(String args[]){ Scanner input = new Scanner(System.in); String userInput = input.nextLine(); if(userInput == "hi"){ Voice v; VoiceManager vm=VoiceManager.getInstance(); v=vm.getVoice("kutlo1"); v.allocate(); v.speak("Hey my name is kutlo"); input.close(); }else System.out.println("you suck try again"); } } | |
My code has me stumped, My method is right...I think but the output begs to differ. Basically this code is supposed to convert seconds to minutes but the output is somewhat off..here's what I have don so far. String input = JOptionPane.showInputDialog(null, "Enter a value for seconds (positive whole number): … | |
guys please help! im having trouble splitting a word into syllables. what i have so far is splitting a word into different compartment bt cant do syllables, i want the code to to be able slice a part of a word,by looking, vowels INSIDE the word!at the end of each … | |
Hello guys, i have a problem, is there someone can help me? this is my logic.. public static void Check_Fund(){ String header = "Text1,Text2,Text3,FUND_UALFND_1,FUND_UALPRC_1,FUND_UALFND_2," +"FUND_UALPRC_2,FUND_UALFND_3,FUND_UALPRC_3,FUND_UALFND_4,FUND_UALPRC_4,FUN D_UALFND_5,FUND_UALPRC_5," +"Text4,Text5,Text6,Text7"; String text = "ABC;CDE;EFG;PRMF;0;PRFF;50;PREF;;PRCF;0;PRMP;50;HIJK;;LMNO;PQRST"; String[] head; String[] value; String showText = ""; head = header.split(","); value = text.split(";"); String regex = "\\d+"; String … | |
hi guys.iv been trying hard to do a code which requires me to separate a word into syllables in java but i dont no hw to do it. e.g the word:someone #in syllable: so/me/on/e | |
Hello guys, I have the project to build an Automative Leads. The process flow for this scoring engine needs to be as: SOAP webservice will advertise a "SCoreLead" function that requires an ADF lead to be passed to it. any idea will be appreciated Thanks | |
I am on euler project 4, the largest palendrome product of 2 3digit numbers. Here is the program, however it doesn't print a value. please help. package euler; public class problem004 { String reversed; public static void main(String[] args) { int product =0; String stringproduct; //cycles through all the numbers … | |
The requested resource is not available. please help me . how to solve this thnx in advance | |
I got everything until to the point that check if the space is emprty or not. I dont know how to do it. can someone give me an example? | |
Hello I have a text-editor (CKEditor one) whereby am retrieving all the texts (which are in 3 paragraphs), in a single string variable, using Java codes. However, all the 3 paragraphs being retrieved have leading spaces, and I want to remove them for display purposes. How can I do so, … | |
There are no errors or anything in my code, and the program runs and works. However, when I only enter a value in one of the text fields to test the error message, it enters "0" in all of the text fields below it. How can I get it so … | |
What is wrong with my java code in Eclipse? I have 4 different classes and it won't give an output. the problems are in the scorestest with the print function and in scores with the nodes. Please help. ScoresTest: public class ScoresTest { public static void main(String[] args) { // … | |
hi im having a hard time fixing and identifying the problem. sorry abstraction really confuses me. the problem is I should write a weather prediction program using the random number generator. three outcomes should be possible: rain sun and cloud. import java.util.Random; public abstract class WeatherPredicMain { public static void … | |
I have a simple class named as Invoice, in which I'm taking four instance variables to intialize PART NO, PART DESCRIPTION, QUANTITY PURCHASED & PRICE PER EACH ITEM. I have made getters and setters for each variable, also a method is created in the same class as InvoiceAmount which Calculates … | |
So I have writen a program that takes a linkedlist and shuffles it randomly using mergesort algorithm. The problam I'm having now is that the original list loses elements after the shuffle, and after som checking with some outputs it seems that it always one of the extra lists who … | |
Need to set cache in browser using javascrip.If the internet is disconnected the web page is load by the same. Guide Me how will arrive this. | |
I would like to stop and mark as failed too long running junit tests (executed within Maven 3 build). I am aware of three ways of doing it: 1) Using Test annotation with timeout parameter: @Test(timeout=100) public void testWithTimeout() { ... } 2) Using Rule annotation: @Rule public Timeout globalTimeout … | |
i write a code of multithreading in which arise an race condition code is below class Race1{ public void show(String s){ try{ System.out.print("["+s); Thread.sleep(1000); }catch(InterruptedException e){ e.printStackTrace(); } System.out.println("]"); } } class Checking implements Runnable{ Race1 ob=new Race1(); String s; public Checking(String s){ this.s=s; } public void run(){ synchronized(ob){ ob.show(s); … | |
So i've got a for loop that's reversing every other word in a string. I can't determine which condition is causing this. I've spent a good amount of time staring at this and the API, to no avail. Anyone have any idea why it's not working? String newMessage; StringBuilder stringBuilder … | |
when we create a thread like this class Run implements Runnable{ public void run(){ //You code } } class Helloworld{ public static void main(String args[]){ Thread t1=new Thread(new Run()); Thread t2=new Thread(new Run()); } } in above code thread t1 and thread t2 is creating in `main()` method its mean … |
The End.