32,204 Topics
| |
So there's this old programming assignment from last semester and he's giving extra credit if we finish it. Here's the assignment [url]http://www.cs.oswego.edu/~odendahl/coursework/csc212/201009/assignments/04.html[/url] I really want to finish this but it's the first time my class is trying to do it without pseudo code. Here's what I have so far for … | |
Not so new anymore more with Java but as it gets more advanced (for me that at least) the tricks evade me. I would like to output sorted values into my GUI but two things are not happening. 1. Cannot get values to print in GUI but prints on screen … | |
When I compile this program it says "cannot find symbol class Method Master", but when I run it, everything is fine. [CODE] /* *Andrew Davis *Nov. 19, 2010 */ import java.util.Scanner; public class Calculator { public static void main (String [] args) { Scanner keyboard = new Scanner(System.in); MethodMaster method … | |
In class my teacher ran a program similar to this one. When I attempt to run this from home I get a message saying "No main classes found". I know there should be a main in the program but he ran a similar program without it. Just trying to get … | |
hello people... simple doubt [CODE] class test { public static long testApp(long number) { return number; } }[/CODE] when i pass "45638" it returns perfectly but when i pass "23837472"; it's returning not in the range. what's the issue as long has very big value/range.. and how do i pass … | |
I am confused on how to get my x and y coodrdinates to overalap. Can you please help me or give me an example of how to do so. This is the code that I have so far: [code] public boolean hitBy = true; public boolean hitBy(Bullet b) { // … | |
Hello, im having some trouble with my java assignment. The Q: [I]Write a program which will test that a dice is random, i.e. that it is equally likely that any number will appear. E.G The program simulates throwing the dice 6,000 times. The one appears 1003 times, the two, 996 … | |
gedit uses UTF encoding. Therefore, if we store binary data in the file (like through DataOutputStream's writeInt() or writeByte(), etc.), gedit would rightly complain, but if we write something through the writeUTF() function, then gedit should be able to open it as the data is written is UTF which it … | |
Using a BufferedInputStream is useful because it cuts down on read system calls. But the same effect can be produced, say in reading a file, if we use FileInputStream's read method that takes a byte array as input. A lot of bytes are read in a single call. Am I … | |
Am having bit of writiers block about how to fix this error. Its a assignment for college so am really just looking for tip or pointer in right direction. Its a simple card game similar to poker. Card.java [CODE] package pokerpkg; public class Card { //Codes for the suits public … | |
[CODE]public class examination extends javax.swing.JFrame { public Connection con; public Statement stmt; public ResultSet rs; public String sname,sid,sub; /** Creates new form examination */ public examination() { welcome wl=new welcome(); String stname=wl.regdno.getSelectedText(); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:exam"); Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery("SELECT * FROM student where sno='"+stname+"'"); while(rs.next()) { sid=rs.getString(1); sname=rs.getString(2); } … | |
Hi guys! I need help here, When ever I write onto my text file, i get null and then the value.Please help me! I don't want the "null"! Here is how it looks like in Notepad++: null1: 0.22056311934213296 2: 3.017771771149946 null3: 1.508399104807777 4: 0.07575171145562612 null5: 5.187081012091999 6: 2.049001095182013 null null … | |
Hi all I'm new to JMS, im setting up a pilot project, and I'm making use of this tutorial - [url]http://javadude.wordpress.com/2009/01/03/tutorial-starting-with-glassfish-and-jms/[/url] The tutorial is for Glassfish version 2 and JEE version 5, but im using Glassfish version 3, and JEE version 6 now when i try to deploy the project … | |
HI I am working on a project to animate user-defined algos. I am still at the very beginning but I am practicing code in swing and here is an Array class that the user can use in his user defined algo: [CODE] import java.awt.*; import javax.swing.*; public class Array1 extends … | |
Hello friends, I have a problem about JLabel I want to insert a data from database into my JLebel.setText() method.Please help me | |
Hello! I'm trying to solve this problem and I've been at it for hours. [I]Write a method called handScore that takes an array of cards as an argument and that adds up (and returns) the total score. You should assume that the ranks of the cards are encoded according to … | |
[CODE]image = new JLabel(new ImageIcon("C:\\Users\\user\\AutoTextSum\\src\\autotextsum\\newImage.JPG"));[/CODE] As you can see from the instantiation on the label above, I've used a static file referencing whereby I explicitly indicates the physical location. Let say this coding file name is autotextsum.java. How do I put the image without the need to explicitly indicates the … | |
I completed a homework given by my instructor, but it is not doing what it's suppose to do completely. I was able to add a message in the pixel, but if I run it, some wierd characters were added after the message here's my work. I was only assigned to … | |
Develop a car loan payment calculator. Design a GUI, using NetBeans GUI Builder, to enter price of car, down payment, interest rate, and length of loan in years. Your bank only offers 3 interest rates 5%, 10%, and 12% based on credit rating. Use grouped radio buttons to select between … | |
I'm trying to make cars of a certain color go from one array to another. For example if I want all red cars to go to be displayed, I throw the red cars into another temporary array and they get displayed on the screen. How would I make this work? … | |
Hello! Does anyone have any idea about Futoshiki Puzzle Solver. I'm new to programming and i want to make a puzzle solver in java. Any helpful reply would be regarded. Thanks | |
Hello. I am running a program form my book and i get this warning from eclipse that says: "The serializable class ColorWindow does not declare a static final serialVersionUID field of type long" [CODE]import javax.swing.*; //Needed for Swing classes import java.awt.*; //Needed for COlor class import java.awt.event.*;//Needed for event listener … | |
hi frnds i want some small basic java projcts samples and some tips to develop a projct plzz help me.. | |
Environment: eclipse I have reached a snag with finding the perfect numbers from 0 - 1000 while using methods with multiple perimeters, one project, tow classes. There is an example on this site from quite a while ago within one single class. That is in a later chapter in my … | |
I need help with this hw problem. Generate a 2-D array of 25 integers and initialize them all to 0. Assign the value 9 to five random locations in the array to represent your mines. Fill the remaining array locations by counting the number of mines in any adjacent squares. … | |
THis is what I need to do...I need help with the third point [INDENT]1. Write a class OrderedList. The implementation of OrderedList must be as a linked list of Comparable elements. The list items are maintained in ascending order at all times. On this assignment, no indexing methods are allowed. … | |
Hi again everyone. I am trying to change around this program I wrote to meet some new requirements, but getting stuck on how to do it. *Write a program that reads a file consisting of students' test scores in the range of 0-200. The students scores should be stored into … | |
Ok, well I am now working on a new program where a program that counts the number of times a digit appears in a telephone number. And I have no idea how to even start this. Can anyone please help? Atleast try to give me a outline or something. Heres … | |
How do I overwrite the 7th, 8th and 9th column of the text file with new values? What can I use? [CODE] ATOM 1 N ASN A 1 12.844 -5.008 -17.071 1.00 0.00 N ATOM 2 CA ASN A 1 12.377 -4.399 -15.793 1.00 0.00 C ATOM 3 C ASN … | |
FileInputStream inherits from InputStream which has a mark() method which does nothing. FileInputStream itself doesn't define any mark() method. Even then, if I wrap a FileInputStream object inside a BufferedInputStream object and call markSupported() on it, it returns true. In the docs, it says that the mark() method of any … |
The End.