35,618 Topics

Member Avatar for
Member Avatar for Lulie

[B] I have this method:[/B] [code] static int countLeaves(BinaryNode node) { if (node == null) { return 0; } else if (node.left == null && node.right == null) { return 1; } return countLeaves(node.left) + countLeaves(node.right); } [/code] and i want to Write a client program that constructs a binary …

Member Avatar for Lulie
0
118
Member Avatar for bufospro

Hi, I want to make a game that I saw in internet but via applet code (and with move counter). The game is [URL="http://leepoint.net/notes-java/examples/games/slidepuzzle/slidepuzzle.html"]http://leepoint.net/notes-java/examples/games/slidepuzzle/slidepuzzle.html[/URL] Could someone help me please ???

Member Avatar for jwenting
0
135
Member Avatar for schender

Hello, i tried too long so i describe my problem here. im really desprate. I want to link from JSP1.jsp to JSP2.jsp with a simple <a href=...> statement This link should also have an identification number. this is my JSP1.jsp: [CODE] <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC …

Member Avatar for javaAddict
0
226
Member Avatar for sonmagy

I want view web page by http connection in j2me but the output is html code if any one can help me please replay

Member Avatar for sonmagy
0
85
Member Avatar for trashbat

I'm trying to convert from some Java code, and I've got one massively complicated headache. Bear with me while I see if I can provide a comprehensible explanation. Let's suppose I have an abstract class called BaseDatatype. Other classes will inherit from this, e.g. StringDatatype, NumericDatatype and so on. Now, …

Member Avatar for Antenka
0
138
Member Avatar for sam.wonghk

Hi All, I am writing jsp to export data in excel format to user. An excel could be recieved on the cient side. However, since there's large amount of data, and I don't want to keep it in the server memory and write them at the end. I try to …

Member Avatar for sam.wonghk
0
104
Member Avatar for BobbieJean

I've gotten this applet to do some of what it should but I'm having trouble getting it to do the rest. It's a multiplication applet that asks the user a question such as "What is 6 times 7?", has a JTextField for the user's answer, and a JButton to check …

Member Avatar for quuba
0
108
Member Avatar for Khodz

Hi Everybody, I'm currently doing a Computer Science IB course in which I'm required to create a java program of my choice. I'm quite new to java but i still chose something i thought would be cool and it turned out to be a little harder than i thought. As …

0
72
Member Avatar for thiyagu_mca2006

Hi All, Im Thiyagu, a junior software developer(Java/J2ee). I have assigned to access Webservice (sending request and receiving response from a WSDL). can any tell me the steps involved to convert Java code from a WSDL file using Axis(with ant build script). please very urgent. Note : I already tried …

Member Avatar for MudassarNazar
0
637
Member Avatar for lilpinay

this project is to determine if a phone number is a prime number. if the number is a prime number then print a message to the effect. if the number is not a prime number then print the prime factors of the number. allow the user to continue entering numbers …

Member Avatar for javaAddict
0
91
Member Avatar for the_preface

I'm writing a program that reads information from three seperate classes. Here is my code: [CODE] public class Animal { protected int id; protected String type; protected double mass; //------------------------------------------------------------------------ // Sets up an animal with the specified ID number, type and weight. //------------------------------------------------------------------------ public Animal (int animalID, String animalType, …

Member Avatar for javaAddict
0
169
Member Avatar for zigana91

I am working on an assignment where I am to create a mortgage calculator that allows the user to input there mortgage amount, term and interest rate. The following is what I have so far. The errors I keep coming up with are the following: The Decimal Format the for …

Member Avatar for javaAddict
0
156
Member Avatar for pradeepktg

Hi All, I have developed a web application using jps. I have a user pages, which can be accessed after entering login credentials. If a user tries to go the a certain page directly without logging in, it directs to login page, this works perfectly in all browsers except mozilla. …

Member Avatar for pradeepktg
0
105
Member Avatar for ShuiYinDeng

Sever.java file [CODE]import java.net.*; import java.io.*; import java.util.*; /** * Simple server use to teach University of * Northumbria's Operating Systems and Networks modules. * To be used with compatible simple client. * <PRE> * Protocol: * client <---message--- server * message = <message body> CRLF * </PRE> * * …

Member Avatar for moutanna
0
131
Member Avatar for BobbieJean

Hi, I'm having a hard time getting my applet to even build right. Here are the instructions my instructor gave: [I]"Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers. The program should …

Member Avatar for BobbieJean
0
420
Member Avatar for zreed

I need to do the following program, but it need to have a do while loop, scanner for input, and a console program. Here are the instructions: Write a Java program that prompts the user for how many individuals they will be entering. Then program will then prompts for each …

Member Avatar for Katana24
0
263
Member Avatar for AFB

java.awt.*; import javax.swing.*; import java.awt.event.*; class Getaction implements ActionListener{ String am = ""; String req ; String em = ""; String oper = ""; double x,y ,result; String res; Addcomp get = new Addcomp(); public void actionPerformed(ActionEvent ev){ req = ev.getActionCommand(); if((req.equals("1")) ||(req.equals("2"))||(req.equals("3"))||(req.equals("4"))||(req.equals("5")) ||(req.equals("7"))|| (req.equals("8"))||( req.equals("9")) ){ if (oper == …

Member Avatar for Katana24
0
140
Member Avatar for psomis

hallo guys.i am newbie at java and i want ur help. i have created the 5 five buttons but not the action listeners for them. the five buttons are : add person, see ll persons, search a person,update a person, delete person.so when i press add person the programm should …

Member Avatar for psomis
0
2K
Member Avatar for anoopasta

Hi All, I am working on Digitally Sign XML and managed to do it. The problem is that the code is automatically picking up one of the key and signing the XML with that. I want that user gets a drop down which has list of all the installed DSA …

Member Avatar for peter_budo
0
66
Member Avatar for damith.igv

I want to add a chat room for my web site,I have used jsp/servlet technology to develop my site, I have heard that like "jaxter" or something, I don't know how to spell it. Appreciate if someone can help me for this.

Member Avatar for peter_budo
0
41
Member Avatar for BobbieJean

Hi, I'm having a hard time getting my applet to even build right. Here are the instructions my instructor gave: [I]"Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers. The program should …

0
75
Member Avatar for javanewbee

[code] Statement statement = connection.createStatement(); String frmdate = request.getParameter("date1"); String todate = request.getParameter("date2"); SimpleDateFormat df = new SimpleDateFormat("DD/MM/YYYY"); //Date frmdate = df.parse("strdate1"); //Date todate = df.parse("strdate2"); try { // java.util.Date date3 = df.parse(frmdate); // java.util.Date date4 = df.parse(todate); java.util.Date ufdate1 = df.parse(frmdate); java.util.Date utdate2 = df.parse(todate); java.sql.Date fs1 = new …

Member Avatar for javaAddict
0
170
Member Avatar for musikluver4

I have spent over a WEEK trying to figure out why my code isn't working. It's a long code, I will post it all but I will break down the code as I explain. First off, I have called double[] arrays and then initialized them later on in the program …

Member Avatar for musikluver4
0
3K
Member Avatar for Xeros606

I am making Tetris in Java. I have the Grid as its own class (extends JPanel) a menu bar (also extends JPanel) and a class for the main game window (extends JFrame). I created instances of the Grid and the menu bar inside the main game window class and added …

Member Avatar for javaAddict
0
84
Member Avatar for rena0514

my teacher wants the tictactoe game to have a button called play that resets the tictactoe game my button doesn't work....what did i do wrong? [CODE] //TicTacToePanel.java Author Carien Anderson //Represents tic tac toe game board and allows peer to peer competition import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.JOptionPane; …

Member Avatar for javaAddict
0
2K
Member Avatar for jman212

I have this 2d array that sorts the rows but i can't sort the column.. i can't figure it out for the life of me. PLEASE HELP Please enter size of row between 1 - 20: 5 Please enter size of column between 1 - 20: 5 Your matrix is …

Member Avatar for sneaker
0
144
Member Avatar for bi0201

Hi i'm a new student in java and would appreciate anyone helping me get through. I do not want you to do my work because that won't help me get through the next and next assignments however I would appreciate your help putting me on the right track such as …

Member Avatar for javaAddict
0
160
Member Avatar for pradeepktg

Hi All, How to store the resultset value in a array? I have a field "prodvalue" in DB Table, now i want to store this "prodvalue" in array. Am able to print the values of "prodvale" in jsp, but not able to store in array. Pl. find below the code, …

Member Avatar for pradeepktg
0
7K
Member Avatar for whimsical1987

I am trying to implement a protocol that includes cryptography. What I am supposed to do is encrypt a combination of two public keys and a message. Although I have the message in String format I don’t have the public keys in string format. I am making use of getpublic …

0
67
Member Avatar for bi0201

The End.