32,204 Topics
| |
I have this code so far: //Carolina Dominguez //Assignment 7 public class Student { private String fname; private String lname; private String studentId; private double gpa; public Student(String studentFname,String studentLname,String stuId,double studentGpa) { fname = studentFname; lname = studentLname; studentId = stuId; gpa = studentGpa; } public double getGpa() { … | |
excuse me, im doing atomix game and there is something that i can do as an extra thing which is while the atom moves i see it moving no just disappearing and showing in the next position? thx :) | |
Hi, I was asked to write a class that represents a Student The Student class has the following attributes: first name String // May be 2 words: Mary Ann last name String // May be 2 words: Smith Jones student ID number String gpa double // Range 0.0 to 4.0 … | |
Hello Could someone tell me what derby requiers to make this conn? [code] public boolean createDatabase() throws FileNotFoundException, IOException { boolean createdDb = false; Connection conn = null; String dbURL = getDbURL(); String user = ModelUtils.getXMLResource("user"); String password = ModelUtils.getXMLResource("password"); System.out.println("in CreateDatabase:try:dbURL FROM XML properties: " + dbURL); System.out.println("in CreateDatabase:try:dbURL … | |
i want program to find the transpose of the graph G, where the input and the output of the program are represented as adjacency list structure. pleeeeeeeeeeeeeeees help me | |
Write a program to find the transpose of the graph G, where the input and the output of the program are represented as adjacency list structure. | |
I've written the code already, and it compiles, but gets the following runtime exception: [COLOR="Red"]java.lang.IllegalThreadStateException at java.lang.Thread.start(Thread.java:595) at threads.ThreadStarter.run(ThreadStarter.java:52) at java.lang.Thread.run(Thread.java:619)[/COLOR] I've higlighted the line that throws the exception. I have no idea what's wrong, my knowledge in threads is sadly lacking. If anyone could help me out it would … | |
Hey, I am trying to use this program, it is supposed to ask one multiple choice question of the user and get the response. For some reason it will not work for me. I am using Ready to Program by HoltSoft. Please help me. [CODE]import java.awt.*; import java.applet.*; import java.io.*; … | |
ok, so i have an int[][] that i need to be printed out into a file. it needs to be printed line by line with each number seperated by a comma. how does this look? im not getting any output... [CODE]import java.io.*; import java.util.*; public class TestingII { public static … | |
I tried making a Java desktop application to learn Java. So far, a mouse click event draws rectangles in the document and stores the rectangle in an array in ProjectApp.java. This isn't the problem but my rectangles disappear when I minimize and maximize the window. I normally use VS C++ … | |
| Hello all, I am new to java and programming. You will be able to tell that by my post. I have a program that needs to take info from my textField and store it in an 2d array. Then do calculations and output the calculated data into a textArea. So … |
plxxxxxxxxxxx help me thts ma java assg for mean median and mode i have calculated some part of it for group data can any 1 help me to find out the rest offfffffff [code]String ans; int total=0,small=0,large=0; int numEntries=0; float range=0.0f; float wid = 0; // user enters number String … | |
I'm writing a program that reads information from three seperate classes. Here is my code: [CODE] public class Animal { protected int id; protected String type; protected double mass; //------------------------------------------------------------------------ // Sets up an animal with the specified ID number, type and weight. //------------------------------------------------------------------------ public Animal (int animalID, String animalType, … | |
I'm having a problem changing an abstract class to an interface. I changed the abstract class (Bounceable) to an interface but I'm not sure what I need to do with the concrete classes (Tennisball, Basketball) that implement the interface. The change to an interface is also affecting the output test … | |
Hello, can anyone help me please..I have four tables in mysql as follows: Employye1,Employee2,Employee3,Employee4. I need to retrieve records from any table i choose and display the record on a JSP page. I just need to know how to pass the table name as parameter? for e.g Select Emp_name from … | |
I created a JApplet game for a class project. My game is basically a dodge-ball game. I have 5 dodgeballs bouncing around the screen with a player starting in the middle. The object is to mouse drag the player dodging all of the balls bouncing. The problem I am having … | |
Yeah, this is homework, but I have spent many hours and have asked many other students at my school to help and so far we haven't solved my problem. I am trying to write a program to figure out the first fit, best fit, and worst fit. I have randomly … | |
what is the actual difference between java and javax packages | |
[QUOTE=peter_budo;695619]Not enough that you opened thread that is 4 years old, you did not bother to read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]forum rules[/URL] (hijacking thread, no emails in the post) you also did not even consider to read sticky thread "[URL="http://www.daniweb.com/forums/announcement9-2.html"]We only give homework help to those who show effort[/URL]". On top of all … | |
| Hey, i dont get any compile errors on this code but when i run it i dont get an evaluated value, what have i missed??? [CODE] import java.util.Scanner; import java.util.StringTokenizer; import java.lang.Math; public class main { static Stack<String> stack = new NodeStack<String>(); static final String operators = "+-/*^"; static Scanner … |
Let us know which language you are coding in and we can move this to the correct forum. | |
Ok, so I wrote a very simple programme, just to practice multithreading. I know it can be coded better, but I'm still learning about this, so please be lenient. This is my code so far: [CODE]package threads; // Create a thread import java.io.File; class threads implements Runnable { // This … | |
hello every one i am haveing problem in code i.e whenever i try to write in file it overwrite tthe previous one.I am using this code [code] File f=new File("c:\\paul.txt"); //f.createNewFile(); BufferedWriter br = new BufferedWriter(new FileWriter(f)); BufferedReader br1=new BufferedReader (new InputStreamReader(System.in)); FileReader fr=new FileReader(f); // FileWriter frt=new FileWriter(f); // … | |
[B]Card.java[/B] [CODE] package poker; public class Card { int suit; int rank; public Card () { suit = 0; rank = 0; } public Card (int s, int r) { suit = s; rank = r; } public int getSuit () { return suit; } public int getRank () { … | |
Hi , how do i write a program on touch screen zoom , sroll left to right and right to left , how to open keyboard(virtual) when we focus on textfield or textarea. | |
@SuppressWarnings("unchecked") class MyBooks implements Comparable{ static final CompareLastName c1 = new CompareLastName(); static final CompareFirstName c2 = new CompareFirstName(); static final CompareTitle c3 = new CompareTitle(); static final ComparePrice c4 = new ComparePrice(); static final CompareISBN c5 = new CompareISBN(); static final CompareDate c6 = new CompareDate(); private String lastname, … | |
hello i am trying to write in file and when ever i do this previous lines overwrites in file .i am trying this code File f=new File("c:\\paul.txt"); //f.createNewFile(); BufferedWriter br = new BufferedWriter(new FileWriter(f)); BufferedReader br1=new BufferedReader (new InputStreamReader(System.in)); FileReader fr=new FileReader(f); // FileWriter frt=new FileWriter(f); // BufferedReader brz=new BufferedReader(fr); … | |
Posted below is currently my main class that works for a java blackjack game, i do have 3 other classes for the full game to work but this class is where my problem is. my problem is in the west border i have so much being written to the GUI … | |
I have deployed a simple web service using Apache Tomcat 6.0 and Axis 1.4 in Windows XP. Now the server is very simple: [CODE] import java.io.*; import java.util.*; /* HelloWorld.java This is our web service */ public class HelloWorld { public String getHelloWorld(String id) { String retName=""; try { File … | |
I'm a little new to programming and for my class I've been asked to do a recursive program where you input a directory and it will find all the files in that directory and any subdirectories in that directory, etc etc until there aren't any more subdirectories. Quite honestly, I'm … |
The End.