35,618 Topics
![]() | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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); } … | |
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 … | |
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; … | |
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 … | |
can i find the prime number using square root function and tell me how can i generate the prime numbers | |
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 … | |
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 … | |
4 4 33 33 222 222 1111 1111 000000000 1111 1111 222 222 33 33 4 4 | |
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) … | |
How the computer is not "Random" I want the player can not win! Player only draw! Thank..:yawn: | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
Hi, I'm finding hard to find solved exercices for UML. Mainly with Class diagrams. Any tips ? Thanks | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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;"); … |
The End.