35,618 Topics

Member Avatar for
Member Avatar for Arpssss

I have a Hash Table like, HashTable ht = { (1, 1), (2, 1), (3, 1) } Now, I implement it like, Integer foo = Integer(1) and declare hash table like, HashTable ht = { (foo, foo), (2, foo), (3, foo) } Now, as per I understood from [URL="http://www.kdgregory.com/index.php?page=java.refobj"]this[/URL], it …

Member Avatar for JamesCherrill
0
188
Member Avatar for jayadan

How to convert these inputs as regular natural numbers 1) 0x000F 2) 0x2222 and similar inputs likes this. Guys i want the coding part and also the simple manual regular calculation part too. Thnks in advance.

Member Avatar for JamesCherrill
0
132
Member Avatar for TIM_M_91

Hi guys I have a loop that increases my setsize to 1100 which works fine. My question is is it possiable for when I click my button the loop executes then if I click the button again it does not execute the loop and carry's on with the rest of …

Member Avatar for stultuske
0
97
Member Avatar for RDane
Member Avatar for jasonw749

hi guys, first time posting here. so i have this menu for a game i am making and the image that i have for the menu background has text and things already loaded onto it. what would be the best way to have the text clickable? would it be to …

Member Avatar for jasonw749
0
177
Member Avatar for coderN

[B]Hi Guys What I am trying to do is this. String[] array1 = {"off","off","meeting"}; String [] array2 = {"off","off,"off"}; String[] array3 = {"meeting","off","off"}; I want to make an 4th array which will give me "off" at the position where all are off, otherwise it say "bz" at that position. FOR …

Member Avatar for NormR1
0
113
Member Avatar for TIM_M_91

Hi guys what I want to do is set a new setSize which I can do but it just appears. Therefore what I want is for the setSize to move over time instead of just flicker and appear. Any help would be appriciated: [CODE] if (e.getSource() == set) { setSize(1000,1000); …

Member Avatar for JamesCherrill
0
143
Member Avatar for DEAD TERMINATOR

I have a couple of questions about a school project I'm working on. The code is as follows. [code]public class Player { private PlayList playList; private Track track; /** * Constructor ... */ public Player() { playList = new PlayList("audio"); track = playList.getTrack(0); } /** * Return the track collection …

0
89
Member Avatar for mits28

I am using two ResultSet in a single statement..this code is a part of servlet.. [CODE] String temp=request.getParameter("cid"); int cid= Integer.parseInt(temp); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:Mydatasource"); PreparedStatement ps = con.prepareStatement("select * from Products where cid=?"); ps.setInt(1, cid); ResultSet rs = ps.executeQuery(); while(rs.next()) { out.println("<a href = 's_BikeServlet?pid="+ rs.getInt(1) + "'>" …

Member Avatar for mits28
0
464
Member Avatar for applejax77

Below is an address book program I am working on. The way it stands now, when the data is entered and writes to a text file it writes the line of data like, John Doe 1234 Help Me Avenue Dallas Texas 98956 Johnathan Doe 2345 Derby Lane Omaha Nebraska 45678 …

Member Avatar for applejax77
0
246
Member Avatar for aanders5

Ok, so I am making a game and the music changes when you are in different regions or if there is an interruption, like with an AI. So I have JUST learned how to make music showup in my program, and now I am trying to make it stop, but …

Member Avatar for Philippe.Lahaie
0
3K
Member Avatar for lena1990

i want applet connect to another machine but the socket cannot connect to the server i searched the web and there is something about giving permissions to the applet but i donnot know how to do so

Member Avatar for NormR1
0
376
Member Avatar for LFCFan_07

Hey guys, I need help finding out what is wrong with my code, I have no errors, but it is not doing what I want it to. I need my code to print a bar code when a user inputs a zip code. My program does not get to the …

Member Avatar for NormR1
0
200
Member Avatar for shean1488

Hi everybody, In my little programm, that prompts user to choose txt file, and then displays how many each particular token in the file. I have a little issue with organising the ouput. I think I do something wrong with String.Format, can you please help me: I attached my ouput. …

Member Avatar for Philippe.Lahaie
0
135
Member Avatar for clapton

Hi. I wrote this program claculator java rmi.but not implemented. you can help me? [CODE]import java.rmi.Remote; import java.rmi.RemoteException; public interface calculator extends Remote { public long add(long a, long b) throws RemoteException; public long sub(long a, long b) throws RemoteException; public long mul(long a, long b) throws RemoteException; public long …

0
62
Member Avatar for Ashenvale

Hi guys>.< I'm trying to make a program that suppose to output like this: [QUOTE]Enter a String: [COLOR="red"]1231asd[/COLOR] No. of Digit: [COLOR="red"]4[/COLOR] End the Program? [COLOR="red"]y[/COLOR] [/QUOTE] *the [COLOR="red"]red[/COLOR] part is the input from the user. but the problem is, the no. of digits only display 0 and not the …

Member Avatar for Philippe.Lahaie
0
113
Member Avatar for jahanruhi3@gmai

package com.batch; import java.sql.*; import java.text.SimpleDateFormat; import java.util.ArrayList; import DBConnection.DBConnect; public class Batch { @SuppressWarnings({ "unchecked", "rawtypes" }) public ArrayList BatchAction(String ik) { Connection conn = null; Statement st = null; ResultSet rs; ResultSet rs1; ArrayList al = new ArrayList(); conn = DBConnect.getConnection(); final SimpleDateFormat monthDayYearformatter = new SimpleDateFormat( "dd …

Member Avatar for reubenj
0
149
Member Avatar for devin2203

Hey everyone I have created an application interface using Java swing on a mac, which looks exactly how I want it. However on windows and Linux the positioning of the components and what seems to be the dimensions look of place. I have tried to make the sizes of everything …

Member Avatar for JamesCherrill
0
166
Member Avatar for apanimesh061

[CODE] import java.io.*; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.lang.*; import java.util.LinkedList; import java.util.List; /** * * @author Animesh Pandey */ public class Main { public static int [][] sort( int a[][]){ int i, j, t = 0, t1 = 0, t2 = 0 ; for(i = 0; i < a.length; …

Member Avatar for NormR1
0
195
Member Avatar for Samaka

Hello, I'm doing a simple J2EE application that will interact with a database like Oracle and you know that a database can have multiple oracle schemas and that is the problem (because I do not know how to configure hibernat with multiple schemas :( because my application can handle multiple …

Member Avatar for Samaka
0
212
Member Avatar for applejax77

Below is an address book program I am working on. The way it stands now, when the data is entered and writes to a text file it writes the line of data like, John Doe 1234 Help Me Avenue Dallas Texas 98956 Johnathan Doe 2345 Derby Lane Omaha Nebraska 45678 …

Member Avatar for Philippe.Lahaie
0
173
Member Avatar for vikrammalik

Can anyone tell me which book i have to preferred for java servlets.If any one has program with him then please post them.

Member Avatar for kb18001
0
66
Member Avatar for justindill

costPerItem, itemQuantity, and productName keep getting the error "cannot find symbol" [CODE]package shoppingcart; import java.text.DecimalFormat; public class ShoppingCart { private double totalCost; private LineItem[] myItems; private int max = 100; int numberOfItems; //Provide a constructor for this class public ShoppingCart(int size){ max = size; this.totalCost = 0; myItems = new …

Member Avatar for NormR1
0
144
Member Avatar for raminsha

I can't upload file with form data. I am getting null value when accessing Request.getParameter("name"); how can i upload file as well as form data please help

Member Avatar for peter_budo
0
63
Member Avatar for mp9036

/** A programme which converts weight from pounds to kilograms and the height from inches to centimeters, then it calculates body mass index. @author */ import java.util.Scanner; public class BodyMassIndex { public static void main(String[] args) { Scanner BMI = new Scanner(System.in); System.out.println(BMI.nextLine()); double p, k, c, i, bmi; Scanner …

Member Avatar for stultuske
0
284
Member Avatar for crash bash

Hi Guys i do not know how to create Array of object could you help me plese?

Member Avatar for ztini
0
108
Member Avatar for shean1488

Hi everybody I have a little question. I am using JFileChooser to open file and then process it.But the thing is its only works for txt file. What are the other ways to open all ither text files. Plus if would be really helpful if you would tell me how …

Member Avatar for shean1488
0
294
Member Avatar for Eye_Kneed_Help

Hey Everyone, I'm new to JCreator and trying to compile this program, however I keep getting "missing return statement"...please help. import javax.swing.JOptionPane; public class DoCount { public static void main(String[] args) { String nString=JOptionPane.showInputDialog("Enter n:"); int n = Integer.parseInt(nString); factorial(n); } public static int factorial(int n){ int count = n; …

Member Avatar for ztini
0
252
Member Avatar for DanHu

Hi, I am trying to create a binary tree from a string read from a file. The string contains information that tells which is the new left and right nodes, and the node which new these nodes are to be added (assuming there is a root node in the tree …

Member Avatar for ztini
0
535
Member Avatar for maxinville

Hello everybody, I am new to Java, I am creating a simple application that will insert into my database, but what I really want is, I have a class called product which contains the jTextfields of the product description and product qty and a button called test, and I also …

Member Avatar for maxinville
0
687

The End.