32,204 Topics
| |
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 … | |
What is Bottom up & Top-down approach And How it can be implemented in JAVA? | |
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 … | |
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 … | |
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") … | |
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, … | |
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 … | |
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 … | |
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(); … | |
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 [] … | |
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 … | |
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+" … | |
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 … | |
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 = … | |
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. | |
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 | |
| 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? |
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 … | |
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? | |
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 … | |
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. * … | |
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 … | |
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! | |
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. … | |
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 … | |
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 … | |
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{ … | |
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 … | |
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 … | |
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 … |
The End.