32,199 Topics

Member Avatar for
Member Avatar for lashbandi

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 …

Member Avatar for BestJewSinceJC
0
942
Member Avatar for student.09

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 …

Member Avatar for BestJewSinceJC
0
102
Member Avatar for LucarioWill

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 …

Member Avatar for BestJewSinceJC
0
161
Member Avatar for DarrelMan

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 …

0
59
Member Avatar for progr

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]

Member Avatar for progr
0
84
Member Avatar for Geodude0487

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 …

Member Avatar for moutanna
0
283
Member Avatar for ttboy04

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 …

Member Avatar for ttboy04
0
154
Member Avatar for gradstud

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 …

Member Avatar for gradstud
0
318
Member Avatar for lowtolerance
Member Avatar for Joanna234

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"); …

Member Avatar for masijade
0
69
Member Avatar for sbrown2594

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, …

Member Avatar for quuba
0
711
Member Avatar for luvthug

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 …

Member Avatar for luvthug
0
132
Member Avatar for ceyesuma

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. …

0
35
Member Avatar for aks_1

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 …

Member Avatar for aks_1
0
60
Member Avatar for DRxACULA

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 …

Member Avatar for javaAddict
0
189
Member Avatar for albert1901

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] …

Member Avatar for sennat_26
0
141
Member Avatar for sajohnson05

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 …

Member Avatar for jwenting
0
127
Member Avatar for BobTheLob

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. …

Member Avatar for moutanna
0
230
Member Avatar for ismithx

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 …

Member Avatar for BestJewSinceJC
0
140
Member Avatar for vitroblue

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 { …

0
30
Member Avatar for Protoroll

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() …

Member Avatar for Protoroll
0
232
Member Avatar for moman1981

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. …

Member Avatar for Rashakil Fol
0
105
Member Avatar for rogue005

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 …

Member Avatar for JamesCherrill
0
75
Member Avatar for IOwnAndPwnU

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 …

Member Avatar for kvprajapati
0
106
Member Avatar for ceyesuma

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 …

Member Avatar for kvprajapati
0
96
Member Avatar for back2grave

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 …

Member Avatar for quuba
0
89
Member Avatar for Agent Cosmic

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 …

Member Avatar for kvprajapati
0
140
Member Avatar for KrishnaDas_003

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?

Member Avatar for masijade
0
102
Member Avatar for Mattpd

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 …

Member Avatar for SasseMan
0
149
Member Avatar for CF019

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 …

Member Avatar for JamesCherrill
0
117

The End.