35,619 Topics
![]() | |
Hello, Thank you in advance for taking the time to help me!! My assignment is to write a dice game in java using the Die.java class.The object of the game is to reach a total of 41 or more by rolling a pair of dice no more than 6 times. … ![]() | |
Hi Everyone, I just need a little bit of help figuring out what i'm doing wrong in my code that the salary keeps output as zero. I'm writing a code that is suppose to determine whether the employee is a staff or faculty and then calculate and output the salary. … | |
Hey guys, Okay, tough one. How exactly would we go about integrating Biometric scanners (e.g. fingerprint scanners) with our software? The way I see it, the scanner scans a finger print, and then saves that data in a database, but what data is this? What file type? This is probably … | |
I have recently started jdbc nd now i am confused that what is the real purpose of Class.forname() method?? Also what is the diff. between Class.forname() and DriverManager.registerDriver()?? plz reply soon | |
i don't know what happened, but i was running an applet that i made on a webpage and it works fine. i have the latest JRE and i am running firefox 4. then i've made some changes to the applet, tested it, it works, and copy and paste the class … | |
Just a heads-up guys. I had JRE update 26 pushed onto client machines yesterday and it broke an important client-server app. This point release changes the serialVersionUID for ImageIcon. The app in question sends images from the server to the cients via a simple writeObject/readObject, which fails at the client … | |
i have this dataset: [CODE]String[][] trainData= { //featIdx////////classInfo {"s", "y", "r"},//0 {"s", "n", "r"},//1 {"w", "y", "r"},//0 {"r", "y", "p"},//0 {"r", "n", "r"},//2 {"r", "y", "p"},//0 {"w", "n", "p"},//0 {"w", "n", "r"},//3 {"w", "y", "r"},//0 {"s", "n", "r"}};//1 int[] trainClassInfo = {0, 1, 0, 0, 2, 0, 0, 3, 0, … | |
Hi , I'm new to servlets and I'm trying out the Date function in servlets. Instead of printing todays date it is giving something like "Date@fbb7cb" this . Could you please point of my mistake .... Following is the code snippet [code] PrintWriter pw = response.getWriter(); Date today = new … | |
i have stuck in a small prob but this is big for me.... i need to upload emp image with emp imformation ...txtvalue should be saved in data base and image should be save in directory ....having path name in db. i dnt knw how to use enctype=mutlpart [code] <%@page … | |
Hello DaniWeb community! I am writing code for problem 10 of Project Euler. I have decided that the Sieve of Eratosthenes was the best option for creating a list of primes less than two million. Here is my code (yes, I mis-spelled Sieve and Eratosthenes): [CODE]package projecteulerjava; class ProblemTen { … | |
Hey Im writing a platform game "Mario style" for mobiles in Java but I seem kinda stuck. Any recommendations on some points I should do? Ill view them and post code Ive done related to them. To recap some of the things done: Map loads I can "move" (what actually … ![]() | |
Im to develop a payroll calculating system using abstract classes and implementing polymorphism, With respect to inheritance of super class Employee by sub classes. i dont know how to start implementing it on GUI, bt its okay on cmd. Any help either with sample code is highly appreciated. cretaros. ![]() | |
![]() | Hi all, I am writing a server in Java and I have an issue which I've been working on for days now and I can't seem to find a solution. I want to upload files to the server using an HTML form. I can read the whole POST request and … ![]() |
I have tried a lot for JDBC using mysql but none of them work.... Can anyone help me how to get this work.... [CODE] import java.sql.Connection; import java.sql.DriverManager; public class Main { public static void main(String[] argv) throws Exception { String driver = "com.mysql.jdbc.Driver"; String connection = "jdbc:mysql://localhost:3306/abc"; String user … | |
hi everyone!!pls help me.. here's the problem -Create a program that will input a list or array of number and arrange them in ascending order.Then search a target.. please help me to program this in java!! | |
I used JFormDesigner to create a GUI, and now I need to find out how I can export it so that it's a use-able program with just one click. Here's the code (not sure if you'll need it): [code]import java.awt.*; import java.awt.event.*; import javax.swing.*; /* * Created by JFormDesigner on … | |
I am developing a desktop application in Java which provides chat function to users. I am using smack API and I am using X-Facebook Platform for logging in. I have developed a class which can connect to facebook and authenticate if session key available. But I can't figure out how … | |
Guys i have created a simple Java Desktop application in netbeans.I want to connect it with SQL server 2008.I want to know how to connect it by using ODBC.Plz help me..... | |
hey im new in java. i needto make GUI for my program buh im confused as to what to wirte in GUI codes and wat to write in Main codes etc. could someone plz help me? mathprogram.java main class [CODE]public class mathprogram { public static void main (String[] args){ addition … | |
I am using smack api to connect to gtalk, I need to retrieve raw xml stanzas that are displayed in debug window of smack. Is there any way to do so? | |
I've been doing this for almost 6 hours and i can't figure out what is in my codes. please if there is someone out there can tell me what is the problem here. [CODE]public class thirdAct { public static void main (String write[]) { int beerNum = 99; String word … | |
I have set two environment variables for JAVA JDK. 1. PATH=C:\Program Files\Java\jdk1.6.0_26\bin;%PATH% 2. CLASSPATH=C:\Program Files\Java\jdk1.6.0_26\lib\tools.jar When I compiled the file using javac it was done successfully but when I ran the file using java command I got the following error: Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld | |
I have the code given to me by my classm8 which tells the largest , 2nd largest , 3rd largest and smallest number. but I can't understand how his code works.Can someone explain this to me? [CODE]import javax.swing.JOptionPane; import javax.swing.JDialog; public class exer1 { public static void main(String args[]) { … | |
Dear Daniweb members.. Am on ma way to learn java. I hav bit knowledge about c,c++. Since am new to java, I need help for the following questions: 1. Where can i get the java software? (like turbo c++ for cpp)I need a link for it. I heard that it … | |
Hi all! I have a array problem I can not figure out. I have an array that I copy in a method and returns the copy, but I do not get a copy of the array. I just get strange values. [CODE] public class AClass { private float[] original = … | |
Can any one tell me I learnt about JDBC,Hibernate technologies. I wonder about WEB Projects which uses JDBC technology exist today.? If yes How they are configuring JDBC Logic in web application in practical scenario. thanks. | |
Hi, I need a method that takes an array of Printer type and returns this array sorted by product name. What I have sorts the string names but the thing is it outputs only one product canon. I have been looking at the tutorials and have done much research but … | |
Hello, somehow my program passes directly to else statement after [QUOTE]System.out.println("Would you like to draw another triangle? (Yes/No): ");[/QUOTE] something is wrong with if statement at the end...please help [CODE] import java.util.*; public class Triangle { public static void main (String [] args) { System.out.println("Welcome to the Triangle Program"); int … | |
Okay I am trying to get my program to read the users input as username and password and match it with my database if it is valid then i want it to move them on to the next page. Problem is i dont know how to validate and once validated … | |
For the following segment of java code, the method of “run” occurs four times. I am quite confusing about the relationships of these four occurrences of “run”. Can you explain this to me? The original code is pretty long, I just keep the part that is related to my question. … |
The End.