35,618 Topics

Member Avatar for
Member Avatar for toaster_man

Hey guys im having a bit of trouble here, im not really sure what to do. So i need to make a method which checks these requirements: String must have at least eight characters.(Done) String consists of only letters and digits. String must contain at least two digits any idea's?

Member Avatar for JavaDad
0
122
Member Avatar for roro-

Ok it's all about to create 4 class Class a , class b derived from a and c derived from b and test class Speed is an instance variable in class b and c. The method are : Start() -a method of all class to print the message"hee" override the …

Member Avatar for roro-
0
248
Member Avatar for sid7

I am currently working on a web based application which requires database access in order to execute various sql statements. I can take these approaches: 1) Create a stateless DAO, i.e everything is static. Pros: I do not need to worry about thread safety / performance. Cons: Difficult to switch …

0
57
Member Avatar for robotlogik

hi. i need help for a problem. i have an array of double values in the main method. i am trying to create an object and pass the array to a different class using an overloaded constructor. i am having trouble with the syntax. please help, i need to use …

Member Avatar for robotlogik
0
194
Member Avatar for ProgrammerAl

Hello, I'm currently a student in college and to get right to the point - I'm having a problem with figuring out the logic of making the program. This is how I want my interface to look TOP - MasterMind : Probably JLabel CENTER - Where you set each guess …

Member Avatar for ProgrammerAl
0
1K
Member Avatar for sid7

Hello, I'd like to get people's opinion on the below. Let's say we want to create a constant mapping between int & String within our application. An obvious solution is to create an Enum with a getter() which returns the String based on a given int. However, we could also …

Member Avatar for sid7
0
2K
Member Avatar for musikluver4

I am just curious if anyone knows how to BEGIN to start the coding for telling the program to have a GUI with typical fields, labels, buttons, panels, etc in a GUI, and then when a user presses a button, it goes to a complete different GUI with brand new …

Member Avatar for musikluver4
0
5K
Member Avatar for xecure

Well I'll go straight to the point... I'm trying to recursively move through a binary search tree. I'm not really sure what is wrong with my algorithm (and I'm also pretty new to recursion) but this is what I have: [CODE] public boolean contains(BTreeNode<T> node) { return containsItem(root, node); } …

Member Avatar for xecure
0
136
Member Avatar for amit.hak50

Given that t1 is a reference to a live thread, which is true? A. The Thread.sleep() method can take t1 as an argument. B. The Object.notify() method can take t1 as an argument. C. The Thread.yield() method can take t1 as an argument. D. The Thread.setPriority() method can take t1 …

Member Avatar for ~s.o.s~
0
97
Member Avatar for muncher10

I'm just wondering how I can make the program print results right after inputing a guess.[CODE]import java.util.Random; public class Guess { private int z; private int x; private int y; private int toss; public Guess(int a, int b, int c) { z = a; x = b; y = c; …

Member Avatar for JavaDad
0
98
Member Avatar for jwmollman

Hi guys, I'm having some trouble with my Java homework, and I was wondering if any of you could point me in the right direction. I need to find a loop that will add all the whole numbers from 1 to 1000 and print only the total. I've been spending …

Member Avatar for kikovi
0
183
Member Avatar for kondeti ramesh

can i find the prime number using square root function and tell me how can i generate the prime numbers

Member Avatar for JavaDad
0
56
Member Avatar for LianaN

Hi! My JAVA+MySQL api worked fine yesterday, but today (when I try to connect to MySQL DB from remote machine) the fllowing erro is produced: [ICODE]Java Result: -805306369[/ICODE]. Although there is e.prinstachtrace() in my code, I received only this message. It happens here: [CODE] db = (Connection) DriverManager.getConnection("jdbc:mysql://" + url …

Member Avatar for LianaN
0
353
Member Avatar for tohobaby

i have write this layout but dunno how to write this 3 function in serializable...can u all help me? Y.Y this was the question: Write a programme to keep your friends telephone numbers. You should be able to; a. Add a new name and number b. Look up a number …

0
65
Member Avatar for kondeti ramesh
Member Avatar for quuba
0
86
Member Avatar for andyhunter

part of bigger code but i cant understand why its not working in the correct range [code] Scanner input3 = new Scanner (System.in); System.out.println("Enter House Number;"); houseNumber = input3.nextInt(); do { System.out.println("You must enter a house number between 1 and 1000"); System.out.println("Enter House Number;"); houseNumber = input3.nextInt(); }while ((houseNumber <1) …

Member Avatar for sincerelibran
-1
116
Member Avatar for chiaig12345

How the computer is not "Random" I want the player can not win! Player only draw! Thank..:yawn:

Member Avatar for chiaig12345
0
63
Member Avatar for Crono

I am writing a program that calculates Fibonacci numbers... But I keep getting an error on my code when I try to compile it...: Fibonacci.java:18: illegal start of expression public int calcFib (int n) { ^ 1 error I don't know what I am doing wrong? Someone help? Here's my …

Member Avatar for sincerelibran
0
262
Member Avatar for kchadek

Yeah I know the usual Palindrome problem, but anyway here it is. Given a number greater than zero and up to 200. Find Palindrome of it by adding its reverse to it and repeating until a Palindrome is reached. If taken more than 10 iterations stop. So here is my …

Member Avatar for kchadek
0
103
Member Avatar for vilas_tadoori

Hi All, I have a first hashmap with some values and I have a second hashmap with diff values. Question: How can I find the diff between two hash maps and print only the difference. ~Vilas

Member Avatar for vilas_tadoori
0
7K
Member Avatar for ThomasNeedsHelp

OK so I have this homework assignment for a java class that I am taking. with the exception of a couple things not working right(search, delete) ive pretty much got it. The problem I am having now is that I need to implement a controlled break so that my report …

Member Avatar for seanbp
0
163
Member Avatar for fengapapitt

I'm trying to write up a little "game" that consists of a U.F.O. that flies in all directions (based on buttons) and explodes when it hits the bottom of the screen. I have 4 classes, 2 of which I'm not allowed to edit. They are: The display window [CODE] import …

Member Avatar for IamAuser
0
151
Member Avatar for 080346

Hi, I'm finding hard to find solved exercices for UML. Mainly with Class diagrams. Any tips ? Thanks

Member Avatar for peter_budo
0
62
Member Avatar for lilacemob99

This is my last resort i have had sleepless nights trying to create this code but have had no luck please can someone help me i need to create a piece of code that fit the requirements below The University wants to make a basic graphical display to show how …

Member Avatar for lilacemob99
0
124
Member Avatar for LianaN

Hi! My JTable is populated from remote DB. I would like to set column names from the DB table column "of_shortTitle". However, if I run query "select * from OrgFolders" then column names are taken from "of_title" by default. The table model is given below. How could I set column …

Member Avatar for quuba
0
590
Member Avatar for paniraj s

Dear Sir, i have encountered an error message mentioned above in line no 2696 & the part of "chatting System "code is as follows: public void run()//2696 { synchronized(dec) { try {while (true) { String message = din.readUTF (); System.out.println("received message from server in RUN.. "+message); messageDecode(message); } // end …

Member Avatar for Slimmy
0
110
Member Avatar for nikita.chandra

Hi all, I am creating a dynamic website and i need to use a online chat option. Please tell me if there are any javascript or open source code for that which can be used in Jsp page as i am using jsp and servlet for my website. Please help …

Member Avatar for ~s.o.s~
0
92
Member Avatar for anand01

Dear friends I am beginner to jsp ...I want to upload files to server .. I am using the the following code. saveFile = "C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\ROOT \\Extrusions\\" + saveFile; FileOutputStream fileOut = new FileOutputStream(saveFile); Now i want to save the file into my server ..what should i …

Member Avatar for ~s.o.s~
0
116
Member Avatar for cielle

Hi guys, jfugue is a jar file for music programming. I had run some example from jfugue.. it plays the song. But may i know does jfugue has the method to display the musical notation? N what should i do if i wish to display musical notation as output in …

Member Avatar for cielle
0
275
Member Avatar for Ron2794

I am making a program on library management but in my program I am getting the error when I am extracting the date from MySQl(my database). Below is the short piece of code where I am getting the error. [CODE] Calendar c1=Calendar.getInstance(); ResultSet rs=stm.executeQuery("Select AccessionNumber,Name,Fine,DueDate from issuer natural join classinfo;"); …

Member Avatar for Ron2794
0
629

The End.