32,204 Topics

Member Avatar for
Member Avatar for low1988

I wonder if i writing the correct code segment to read data from binary file.eg.the content file operation in constructor [CODE] try{ raf = new RandomAccessFile("record.dat","rw"); } catch(IOException ex) { JOptionPane.showMessageDialog(null,"Error create file"); System.exit(0); } [/CODE] write content to file [CODE] do { Name = JOptionPane.showInputDialog(null,"Please Enter The Account Holder's …

Member Avatar for low1988
0
110
Member Avatar for ramjeev
Member Avatar for Ramster

hey guys i want an help from you guys to create a jar file for my keylooger project which i had developed in java and vc++ using jni technology.while i try to create a jar file for it using the specified command which create a manifest file ALSO it is …

0
42
Member Avatar for smoore

I am starting to try and learn how to use the google app engine with java. The first roadblock I hit (seems trivial but I can't find an answer anywhere) is logging in. I know how to use the screen google provides you (userService.createLoginURL(req.getRequestURI())) but that only gives you a …

Member Avatar for nblue
0
143
Member Avatar for axn

how do i increment the category book? eventually i will display it in summary *************** Summary Books 3. [CODE]public class ProductDB { public static String[] inventory = {" java", "jsps", "mcb2", "txtp", "sgtp", "tgif", "tcby", "myob"}; public static Product getProduct(String productCode) { Product p = null; if (productCode.equalsIgnoreCase("java") || productCode.equalsIgnoreCase("jsps") …

Member Avatar for BestJewSinceJC
0
114
Member Avatar for Devendra1

I have created a simple struts application, my context name is --- > /LetStart I am using struts 1.3 When I am deploying this application to JBOSS 4.2 It is throwing deploy time exception, pls see below:-- 22:31:14,046 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: org.apache.struts.action.ActionServlet 22:31:14,078 INFO [TomcatDeployer] deploy, ctxPath=/LetStart, …

0
110
Member Avatar for axn

getting error when compiling. "java:60: non-static variable inventory cannot be referenced from a static context for (String show : ProductDB.inventory)" the showCodes class has to public static void. Here is code [CODE]import java.util.*; import java.text.*; public class ProductApp { public static void main(String args[]) { // display a weclome message …

Member Avatar for axn
0
130
Member Avatar for DARK_BYTE

Hi wat's wrong with my "do while" loop it never allows me to enter the grade even if I enter 'A' or 'B' or 'C'..? [code] import java.util.Scanner; public class ArraysOfStudentDetails { public static void main( String [] args ) { Scanner in = new Scanner( System.in ); final int …

Member Avatar for Jocamps
0
99
Member Avatar for Serpterion

Hello there. I've been contemplating on this matter for sometime, and now I'm left stumped. I'm a college student taking a Java 2 course, and was given an assignment that i've nearly completed except one problem. The program description asks you to read from a binary file using the .readUTF(); …

Member Avatar for llemes4011
-1
198
Member Avatar for gibson.nathan

im trying to get the same heat index that prints int the program to write to a file. i have copied the procedure from another program that worked correctly. any help is appreciated. import java.io.PrintWriter; import java.io.IOException; import java.util.Scanner; import java.io.File; public class HeatIndex { public static void main(String [] …

Member Avatar for gibson.nathan
0
103
Member Avatar for didi00

Hello everyone, can someone help me with this please? Create class which will create tables in data base (Microsoft Access). About the tables: number of columns, type of data, lenght of the data. And mantaining the information (the data) in the tables- add data, delete data and edit data. So …

Member Avatar for Jocamps
0
152
Member Avatar for jawaharl0207

Hi friedns, //Demonstrate the clone method [code=Java]class TestClone// implements Cloneable { int a; double b; TestClone cloneTest(){ try{return (TestClone)super.clone();}catch(CloneNotSupportedException e){System.out.println("cloning not allowed");return this;} } }[/code] [code=Java]class CloneDemo1 { public static void main(String[] args) { TestClone x1=new TestClone(); TestClone x2; x1.a=10; x1.b=20.98; x2=x1; //x2=x1.cloneTest();//clone x1 //System.out.println(x2==x1); // System.out.println(x2.equals(x1)); System.out.println(x1.a+" "+x1.b); System.out.println(x2.a+" …

Member Avatar for Jocamps
0
101
Member Avatar for new@java

Hi. Im working on a problem and Im having trouble with it. In the class Mymath, write a method called lab51 that reads three doubles a, b and c followed by one non-negative integer k, and prints the values of the function `y = ax2 + bx + c` for …

Member Avatar for Jocamps
-1
141
Member Avatar for locked_twilight

package MyJava; //change package name according to what the name of the package //the class would be installed to import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; public class [B]Calculator[/B] extends JFrame implements ActionListener{ private JTextField displayText = new JTextField(30); private JButton[] button = new JButton[16]; private String[] keys = …

Member Avatar for locked_twilight
0
946
Member Avatar for nikolai04

i have a tictactoe java code that has mouse events in it. my professor wants me to run it in a mobile phone... can anyone help me with that? please... thanks in advance.

Member Avatar for peter_budo
0
64
Member Avatar for mactavish

i am new in j2me programming and i want to code a file compression/decompression in series 40 phones. anyone could help me or could share their codes with me. thank you very much

Member Avatar for quuba
0
67
Member Avatar for leegeorg07

Hi, the site [url]http://932gs.co.cc/secure_site.html[/url] loads fine for ie and chrome/chromium but for some reason the javascript wont load, can people verify this and if it is true, how can I fix it?

Member Avatar for leegeorg07
0
94
Member Avatar for newjavastudent

Hi all, could anyone tell me how to read a unorder file into order output, I wrote a method that only read order file(begin with product). The following is my code. My input file like this: product Apples location 10 Downing Street London England quantity 382764 location Akihabara Tokyo Japan …

Member Avatar for quuba
0
75
Member Avatar for shroomiin

hello everyone. when working with objects, how would one specify that the input of negative numbers is not allowed in the constructor part of the code?

Member Avatar for Jocamps
0
119
Member Avatar for gretty

Hello I'm new to java & I am trying to convert a float to a string in my simple program. But I get an error on that line. Can you tell me why or what I need to do to fix it? Maybe I haven't imported the right things or …

Member Avatar for Jocamps
0
192
Member Avatar for RoflNinja

Hey, ran into a little trouble with this, keep getting this error. I went over it many times, but can seem to find where the curly bracket is missing or if I have too many or so. [CODE]import java.lang.*; /** * Carries out the instructions from all the objects. * …

Member Avatar for quuba
0
173
Member Avatar for Sinh

Okay, we are on the third assignment in Java, Java, Java. I do not understand the book that well and while I have been searching google for something explained in simpler terms it hasn't came up. We have two files: OneRowNim2.java and Assign3.java The specifications were: You are to create …

Member Avatar for Sinh
0
178
Member Avatar for ShailaMohite

Hello.Can anyone tell me how to differentiate between voice packet i.e. real time packets and data packets i.e. non-real time packets while simulating the network using java network simulator.(jns 1.7) Is there any way to identify the packet header in order to check it! Please help me.Its urgent!

0
62
Member Avatar for ankiwalia

Hi all, i am new to java servlets. i simply created a login form with username and password fields. now when i deployed it on tomcat server, after i click on submit button it gives the following error: java.sql.SQLException: Column not found codin of this login servlet is attached below. …

Member Avatar for ankiwalia
0
206
Member Avatar for low1988

i am creating a bank application with connection of MS ACCESS Database which is already construct a table with the following statement [CODE] Statement stmt = con.createStatement(); stmt.executeUpdate("CREATE TABLE ACCOUNT " + "(AccName VARCHAR(32), AccNum INTEGER, Deposit FLOAT, " + "Balance FLOAT, Withdraw FLOAT)"); [/CODE] So everything works fine ,the …

Member Avatar for javaAddict
0
123
Member Avatar for kulrik

Im having trouble with this problem: The Maclaurin series for arctan(x) is a formula which allows us to compute an approximation to arctan(x) as a polynomial in x. The formula is: arctan(x) = x - x3/3 + x5/5 - x7/7 + x9/9 - x11/11 + . . . Write a …

Member Avatar for javaAddict
0
311
Member Avatar for talablink

I got this code but there seems to be a problem an error showing Error javax.microedition.media.MediaException: Player cannot be created for audio/basic I don't know how to fix it.. Does anyone have an idea? Thanks [CODE]import java.io.*; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.media.*; import javax.microedition.media.control.*; public class RecordMIDlet extends MIDlet{ …

0
97
Member Avatar for kulrik

Homework help Up Vote 0 Down Vote #1 24 Minutes Ago | Add to kulrik's Reputation | Flag Bad Post Im having trouble with this problem: The Maclaurin series for arctan(x) is a formula which allows us to compute an approximation to arctan(x) as a polynomial in x. The formula …

Member Avatar for darkagn
-1
81
Member Avatar for TigerGirl

Hi I am trying to find out the complexity class estimate of algorithms. So, the first one is f(100) = 20, f(200) = 76, f(400) = 325, so would that be O(log2 N)? And then f(100) = 100, f(200) = 119, f(400) = 139, and this would be O(1) like …

0
62
Member Avatar for TigerGirl

Hi I have a method that has a reference to a linked list and an int that is the value. I want to recursively call that value to count and return how often that value is in the linked list. So, here is what I got: [CODE]public static int find(LinkedNode …

Member Avatar for TigerGirl
0
105

The End.