35,618 Topics
![]() | |
Hello everyone, I am having some trouble getting replaceAll(); to work. I am trying to apply it to a String array that has 4 rows and writing the portion of the code as follows [CODE] for(int i = 0; i < 4; i++){ lines[i].replaceAll("this", "that"); } [/CODE] For one reason … | |
Let me explain the scenario I'm in. Currently my company has a desktop set up so clients can individually log in and test our data processing software. This is currently in a linux environment for ease of management. What I'm looking to do is possibly set up a web app … | |
I keep getting these two errors. Timing.java:45: <identifier> expected Public void double squared(double n) ^ Timing.java:54: <identifier> expected Public void double exponential(double n) I can't for the life of me figure out what I am missing. I've been away from Java for about 2 years and I was never really … | |
Hi All, First of all Here is the question and what I have done so far. A) The helper method boolean isVowel (char c) should return true if the character it recieves is an uppercase or lowercase English vowel. For Our purposes, Vowels are the letters a, e, i, o, … | |
I have a quick question: I have two classes. MainPanel and SubPanel I am putting SubPanel inside the MainPanel dynamically. So I have a method inside SubPanel called (toggleSection). All I am trying to do is that, in the MainPanel I am rearranging the components (all JPanels - instance of … | |
hi, I want a code for opening a particular folder on button click. I'm developing an file searching application for linux which gives result in jtable. I want to open the containing folder of selected file I able to retrive the parent folder path from jtable. I just want to … | |
hi, i am compiling a pattern like this Pattern.compile("<.*?>"); my data is like this <sra<pur>kru> when i find the group that i get is <sra<pur> how to get <sra<pur>kru> and how to get <pur>. [how to get nested groups] | |
here is my code and i am receiving errors for my test class. //*************************************************** // // Project 6 // Assigned: 4/27/10 // Due On: 5/4/10 // // This Project Creates a Binary Tree Using the Class // BinarySearchTree, and Inserts an Array of Integers // Into the Tree, and Then … | |
Hi Experts, I have question on the bellow program (runs perfectly), 1. As I have created an instance (object) of startup class and we dint called method [B]paint[/B] from the [B]main[/B] method using the object but [COLOR="Red"]still it is called (how?)[/COLOR]. But in case of Instantiable classes, we need to … | |
using exception try, catch and finally derive a program that accepts any 10 letter string. if the string is greater than 10, display an error message; if string has no vowel display an error message else display only all vowels. can u help me for the java code of this … | |
[B]Moderator comment:[/B]This question was originally posted in [url]http://www.daniweb.com/forums/thread184423.html[/url] and moved as original thread is old Hi there, i need help with my assignment please help me. i want to put your code to my code, which is my code is; i tried but i couldn't solve it. [code]import java.awt.event.*; import … | |
Hi there I'm trying to check if an array area exists, e.g. [CODE]if (array[99][99].exists){ ....}[/CODE] THis doesn't work... e.g. It gives me an arrayIndexOutOfBounds error. What I need for it to do is just ignore and carry on the code. If it finds an arrayIndexOutOfBounds, fine, carry on, just ignore. … | |
please anyone inform me step by step to build a signed jar form a jar.. ie signing a jar file which contains applet | |
Hello, I have got a Java queue and i want to print out the smallest number in the queue. Right now my program prints out the first number in the queue. Here is the code: [CODE] import java.util.ArrayList; import java.util.Iterator; public class Assign1 { private final int MAX_QUEUE_SIZE = 5; … | |
Please help to come to from this problem: i had written a sample code to display Hello and imported as jar files then created new dynamic web project and using a hello.jsp page i am calling the applet class but its not display the applect please give me the solutions: … | |
I need some help with classes and methods. Here is what i need to do: 1. Create a concrete class, Robin, which inherits from Bird. Robin has a single instance variable, name, of type String with private access. Robin implements the remaining required methods. Here is the code for each … | |
I am trying to compare an array user_correct[] if it has a 0 it hasnt been used if it has a 1 it has. However it is not registering my if statements. [CODE]import java.util.Random; import java.io.*; public class Lottery { public static void main (String[] args) throws IOException { BufferedReader … | |
I am suppose to write a method that checks whether a string is a valid password. The password rules are: 1.) A password must have atleast 8 characters 2.) A password consists of only letters and digits 3.) A password must containt 2 digits I need to write a test … | |
I had thought I was finally done with this program, it finally ran but then realized that it wasn't doing the right thing mean LOGIC error :( Can someone plz help me correct this error I have been messing around with it but keep running across errors Here is the … | |
About two weeks ago, I was given a simple project in Java II; code a program that displays an image, plays a sound, and has loop/play/stop buttons for the sound and zoom in/zoom out buttons for the image. I decided to go ahead in the book with this project to … | |
I am looking for help in completing my final due this friday... I need to program my mover to clear the grid using recursion. For some reason, when going counter clockwise when he gets back to the top row he stops. All of my conditions for movement are showing as … | |
When making a GUI, does it matter whether you use 'content' or 'this'? For Example: [CODE]content.add(b1);[/CODE] OR [CODE]this.add(b1);[/CODE] | |
Hey everybody, I was wondering if somebody could help me. I'm having trouble with this assignment, tried to email my teacher a few days ago and he has not returned my email, it's for an online class. The whole chapter is talking about abstract classes and Inheritance and it's very … | |
Hello, For java interface, In one class I have the following code public class ObjectA { public void SampleA() { //do something 1 } public void SampleB((int aPosition) { // user enter some value } } I have another class which is not related to the other class, only interested … | |
I'm having an issue with my code and after hours of time I can't figure out what I'm doing wrong. There are three classes (GUI, Judging, TestGUI). All programs compile correctly with no syntax errors. The GUI creates an interface that should compute (JButton) a total of 8 scores and … | |
Can anyone help me out as well? I'm geting the illegal start error when starting the loop (while) in the following code: [code]import java.util.Scanner; public class Targiln5 { public static void main(String[] args) { Scanner input = new Scanner(System.in); double a, b; System.out.println("Please enter the equivalnce of a and b"); … | |
I have done a lot of PHP but never JSP. I have checked tutorial but not gone too far. I see there are Java beans and some servlets which I'm zero brain at. So I have two questions: 1. Where to read a concise tutorial (Not too detailed I mean) … | |
I was looking for Jump start tutorial for JSP/MySQL. I found Peter budo's sticky. Since I wanted to learn it even offline I decded to put it in word Doc. I will nice format it if I get time and make PDF out of it. However I know some might … | |
I have been working on a program in java which displays the different steps of sorting a list. My step() method updates the gui with the current iteration of the sort, and works fine when it is called from my button's action listener. My goal is to make an auto-step, … |
The End.