32,199 Topics
| |
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 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, … | |
Hi All, I need help with try catch statement at the statement. for code `myChar = s.readLine().charAt(0);` I keep getting error: can't find variable myCar and s if te remove the whole try catch statment I get error: unreported exeception java.io.IOException; must be caught or declared to be thrown on … | |
Hello I have the keycards.xml. and it's DTD and the sys put it in a location out side of my package src folder. Is this correct? Should I move this folder to a package in the src file. I am not sure how to locate it if this is true. … | |
some days back it was working but i don't why suddenly my java program is not compiling. i have set classpath=".;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet.jar". c:\> javac -classpath HowdyServlet.java it shows error in import java.servlet; statement and likewise in all HttpServlet lines too. or i have tried the other way … | |
Problem: I need to create a 2-arg constructor to do the following --> 2-arg constructor that accepts a RetailItem object as an argument that is used to initialize the retailCost attribute. The 2-arg constructor is created in the CashRegister class. here are my classes so far: ------------------------------------------------------- [code]/* * Retailitem … | |
Hi everyone, I have a system where a user can order some predefined items. To do this, I have been using a switch statement, e.g: [CODE] System.out.println("Product?"); System.out.println("\n1. Chair\n2. Table\n3. Desk\n4. Other"); int sel = 0; sel = console.nextInt(); switch(sel){ case 1: <code> case 2: <code> case 3: <code> [/CODE] … | |
Here is my code for a JDBC program to do account transfer. I am having trouble with my transfer code. Can anyone help. This is urgent. [CODE]import java.sql.*; /***************************************************** class BankAccountTransfer { /** Make a transfer from two accounts owned by same customer. * @param custNum the 6-digit customer number … | |
| Okay, so i've been trying to get this code to work for quite some time, and i'm about to go bonkers. Hopefully y'all can help me out with this problem because I need to hand this one in soon. My problem is I need to make an array of objects. … |
Hello there I am looking for some help. How can I go about creating a list of JPanels in Java? I want them all to have subcomponents, to be created dynamically, and be able to return events. How can I do this? I have checked and I know I will … | |
hello i'm supposed to configure a microcontroller connected by serial port all the way from another machine but i'm having troubles fusing my codes this is my rmi stuff [CODE] import java.rmi.*; import java.rmi.server.*; import java.net.*; public class SerialServant extends UnicastRemoteObject implements Communication { public SerialServant () throws RemoteException { … | |
Okay, so I made a method that will take a Track with the MAXIMUM_RATING, which is 10 and make an another ArrayList for those tracks with the highest rating. [CODE] public ArrayList allTracksWithMaxRating() { ArrayList<Track> maxRatingTracks = new ArrayList(); int i = 0; while (i < tracks.size()) { if (tracks.get(i).getRating() … | |
Okay.... I have been working on this for 3 days now and can not get any further than what I have. Any help would be greatly appreciated... Thank you. Here is what I need to do: Write a program for keeping a course list for each student in a college. … | |
I am doing a project on a print spooler. I am using multithreading to support multiple clients. The problem is that I need another thread on the server side to take care of the printing by extracting jobs from a priority queue. If the queue is empty the thread must … | |
I want to be able to maximize and minimize my applet from a menuItem (in a menu). Right now, I have it set up such that the menuItem is supposed to minimize the window, and another menuItem that is supposed to maximize the window (like the Minimize and Maximize button … | |
I have created a class that builds an embedded database and creates all the tables now I am using a properties sheet for creating the table I would like to use XML to hold elements related to each table in an xml properties file to handle an unlimited number of … | |
Hi, I'm completely new to java. I'm trying the tackle this following scenario. For e.g. I've a list of “Tasks” and their dependencies. E.g. Task D depends on (Task A and Task B) , Task A depends on Task B, Task B depends on Task C. I'm trying to write … | |
What I want to know is the difference between the development, scalability and cost of ASP.NET(C#) and Java. I know that in most cases Java is slower than C#. But how much slower? I also know that to run .NET we need Windows(excluding Mono). Will the cost of the license … | |
I want to develop a java application for converting indian time to any world time. I also want to include the daylight saving also. Can anyone please tell me the algorithm to convert indian time to world time? | |
Sorry I couldn't think of a better title, but thanks for reading! My ultimate goal is to read a .java file, parse it, and pull out every identifier. Then store them all in a list. Two preconditions are there are no comments in the file, and all identifiers are composed … | |
| Hi guys, First off I would like to mention that I am not an experienced Java programmer. I've been programming for about a year and taken one AP level course in high school. With the exam in a few days, I was wondering if anyone could clear something up for … |
The End.