35,618 Topics

Member Avatar for
Member Avatar for ezkonekgal

i am trying to write a code that stimulates an simple ATM. i have two class, one for the Bank Account and another for the ATM itself. [code] public BankAccount(String name1, int acctNum, int pinNum ){ name = name1; accountNumber = acctNum; pinNumber = pinNum; balance = 100.00; } public …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for Generalcoco

This is my Final Project and as you can see my program asks the users twice for the test grade I am trying to consolodate and have the program only ask for the test score once and give the letter grade at the same time.? any ideas I do not …

Member Avatar for Generalcoco
0
88
Member Avatar for oldSoftDev

I just started java installed everything that I was required. I just completed my python class. for just trying a java code I tried this code. code: [code=java] /** * This program lets the user play HighLow, a simple card game * that is described in the output statements at …

Member Avatar for jbennet
0
138
Member Avatar for das_das

hello there are 19+ sets of Mock test for SCJP 6.0 and SCJP 5.0 available at [[link removed] It is help full for all so i am putting here ... I am not the owner of the website ..

Member Avatar for verruckt24
0
83
Member Avatar for Chaster

Hello, Can somebody help me out? Well, the problem is the following: I have a JSF page, and the address bar contains a query string, like "...?author=something&title=something". I also have a command button, in its action I want to extract the parameters. So, in the bean I have the following …

0
93
Member Avatar for tsr_tvsk

Hi everybody. here i have a problem with hashtable. i am storing hashtable in session scope and i want to validate that hashtable with javascript in next jsp . how suresh kumar

Member Avatar for stultuske
0
45
Member Avatar for zikojam

Hello The table's cells contain integer values. I would like to save each one of theme them in an array of integers. The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages. I tried something like: [CODE]Object …

Member Avatar for stultuske
0
68
Member Avatar for clueless101

I'm working on a simple matching game, whereby my array includes 3 numbers:{ 5,9,0 } and the user tries to guess them. Instead, I want to use the Random class to generate 3 different numbers from 0-9, but I'm not sure how or where to start. I came across info …

Member Avatar for VernonDozier
0
92
Member Avatar for Narayan15

i have installed Jdk6.0 version, this doesn't contain smack package. here i have written a programme import java.util.Collection; import org.jivesoftware.smack.*; public class GtalkClient { public static void main(String[] args) throws XMPPException { ConnectionConfiguration config = new ConnectionConfiguration("talk.google.com", 5222, "rgukt.in"); XMPPConnection connection = new XMPPConnection(config); connection.connect(); connection.login("< narayana.nuz >","< narayanramlall >"); …

Member Avatar for ~s.o.s~
0
323
Member Avatar for Grub

Hi It is possible to execute terminal commands in java, but is it possible to then get the output or result of the terminal command as input into a java program? If so, may someone tell me how or point to materials that I can read. Many thanks

Member Avatar for Grub
0
193
Member Avatar for BestJewSinceJC

If I have a hash function h(k, f(i)) and f(int i){ return c * i; } And the first index that it tells me to insert the element at already has an element there, what do I do? Would the proper way to insert an element the first time be …

Member Avatar for BestJewSinceJC
0
245
Member Avatar for Aamit

category table id name date duration 1 aaa 12/12/07 1 2 bbb 10/10/08 1 ......... user_table id name date 1 aaa 12/12/07 2 bbb 10/10/08 ....... rating table id user_id name rating date 1 7 aaa 4 12/12/07 2 8 bbb 3 10/10/08 write now i am displaying these user …

Member Avatar for masijade
-1
306
Member Avatar for navinlearns

When i create a JTable like the code shown below: [ICODE][B]String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years"}; Object[][] data = { {"", "", new Integer(5),""}, {"", "", new Integer(5),""}, {"", "", new Integer(5),""}, {"", "", new Integer(5),""}, {"", "", new Integer(5),""}, }; JTable table=new JTable(data,columnNames); table.doLayout() …

Member Avatar for Ezzaral
0
102
Member Avatar for Joncamp

The following code compiles, but I don't have any documentation on how to use the "enum" structure. I cant find any info on it in my books or Sun's language documentation... class Test { enum eone { Plus { int operate(int x) { return ++x;} }, Minus { int operate(int …

Member Avatar for stultuske
0
101
Member Avatar for BestJewSinceJC

I'm trying to read in the whole file at once. If this code ever fails, my whole project will fail. I'm using the following: byte[] theFile = new byte[input2.available()]; then, input2.read(theFile); The API says something about blocking. What exactly is blocking, when will it happen, and how will it affect …

Member Avatar for BestJewSinceJC
0
90
Member Avatar for Srinivas14

Hi can any one send me the code for receving sms through gateway using java program. first i want recevie the sms from mobile through gateway and the i want to send sms to mobile through gateway..plz send me the sample code to achieve this.. Thanks in advance..

Member Avatar for stephen84s
0
102
Member Avatar for vedmack

Hi, i got the following situation: When user clicks on some link, I'm entering a servlet in which I'm copying a file to a network drive, and than I want to open this file on the Client side, for example the file to be opened is a .pdf file. I …

Member Avatar for stephen84s
0
72
Member Avatar for Akangel

Hey everyone, well ill be quickly...ive gotta a JSP page indexMembers.jsp with a button "Show My Reservations" when u click on that button it calls a JFrame (with a JTable inside) with the data from the databse that the user wrote before. now if i click on another button like …

Member Avatar for stephen84s
0
99
Member Avatar for PhiberOptik

I created a GUI. with a bunch of classes (that extended JPanel) and one that extends JFrame and now I can't figure out how to transfer data between them. lets say I have a public variable set in the JFrame class and a get method like the one below: [CODE=java]public …

Member Avatar for BestJewSinceJC
0
218
Member Avatar for star100

Two-dimensional Arrays. My question is based on this info did i code the right ? if not then let me know where did i made mistake? Input Data File here : 88 90 94 102 111 122 134 75 77 80 86 94 103 113 80 83 85 94 100 …

Member Avatar for BestJewSinceJC
0
113
Member Avatar for yingyang

hi every body I am new but there is no time to introduce my self because i have a project to hand in no time but when i tried to lookup session bean in my servlet it give me the error: Borbean not bound //borbean is the session bean so …

Member Avatar for yingyang
0
51
Member Avatar for shareme

Hi I need to get values from xml file. I am trying to do this through JSTL.I worked out in following manner, [code]<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> <c:import url="/corporate/commonjs/YUI_js/validation/valid.xml" var="url" /> <x:parse xml="${url}" var="doc" /> <x:out select="$doc/validationcheck/required" /> My xml file contains, <validationcheck> <required>Required</required> <required>この項目は必須です</required> …

-1
37
Member Avatar for asameh99

I already added the path of my installed java, but the problem is I cannot compile my codes. here is my path. . %SystemRoot%\system32;%SystemRoot%;C:\Program Files\Java\jdk1.6.0_10 and then this is what happens when I compile. . Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Carlo>e: E:\>cd nerd's …

Member Avatar for verruckt24
0
126
Member Avatar for it2051229

hello, i'm new to jsp but i'm not new to web development and been doing PHP for quite some time... I download Java EE and SDK from sun microsystems website and from there when I installed everything, there's a ready made middle ware software to host jsp pages and servlets. …

Member Avatar for stephen84s
0
68
Member Avatar for SmokyMo

Hi I have to make a program to parse html document and check for broken links. I did the first part and now wondering is there a method or class that checks if the link is valid?if not I assumed I can construst a method myself, like get the response …

Member Avatar for stultuske
0
149
Member Avatar for musham

i want the code in JAVA for the program [COLOR="Red"]"To find the shortest path using the fuzzy logic"[/COLOR]

Member Avatar for stultuske
-1
104
Member Avatar for neighbordave

I am having trouble getting output from this program. The objective of the program is to allow the user to enter 5 scores and then it is supposed to calculate the mean and rearrange the data set from highest to lowest. I am supposed to run it through the AverageDriver …

Member Avatar for javaAddict
0
260
Member Avatar for Kusno

I have this method : public void ExecuteSQL(String SQL) { Koneksi getCn = new Koneksi(); Connection cnExecute = null; try { cnExecute = getCn.getConnection(); int rowNgefek = 0; Statement stExecute = cnExecute.createStatement(); cnExecute.setAutoCommit(true); stExecute.executeUpdate(SQL, rowNgefek); cnExecute.commit(); closingConnection (cnExecute,stExecute); } catch (SQLException e) { System.out.println(e.toString()); } } If insert/delete/update raise error, …

Member Avatar for stephen84s
0
188
Member Avatar for eng.M4AH

Alsalamu Alikum, So, It's my first time to study and work on recursion functions, and it was said in the lecture that it is better than the iterative function because [QUOTE]they are shorter, more elegant, more readable, naturally developing and it's code is easier to understand.It comes with more cost …

Member Avatar for mahlerfive
0
134
Member Avatar for PhiberOptik

Hey folks, I am working on a getBalance method that retrieves a balance from a CSV file. I keep getting: [ICODE][COLOR="Red"]java.lang.NullPointerException at java.util.StringTokenizer.<init>(StringTokenizer.java:182) at java.util.StringTokenizer.<init>(StringTokenizer.java:204) at atmEngine.getBalance(atmEngine.java:100) at atmEngine.<init>(atmEngine.java:81) at Launcher.main(Launcher.java:12)[/COLOR] [/ICODE] I can't figure this one out! I threw in some console print outs to make sure it was …

Member Avatar for PhiberOptik
0
1K

The End.