35,617 Topics
![]() | |
How do I initialize an array that has been called from a file? There will be 5 values in the array. So should my file "input.dat" have: 5 (number of values) 4 (value) 6 (value) 7 (value) 2 (value) 7 (value) Example: BufferedReader br = new BufferedReader( new FileReader("input.dat")); and … | |
hey all when i run this code : import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.WindowEvent; import java.awt.event.WindowAdapter; import java.awt.image.BufferedImage; import java.net.URL; import javax.swing.JFrame; import javax.swing.JPanel; import javax.imageio.ImageIO; public class SpaceInvaders { public static final int WIDTH = 800; public static final int HEIGHT = 600; public SpaceInvaders() … | |
I'm not sure what exactly is causing it, but there seems to be a problem with java. I cant play any java games, nor see anything in the java windows. I also cant goto some sites. My problem is a lot like JJJ's on his thread "[URL=http://www.daniweb.com/techtalkforums/showthread.php?t=18415-java]IE and Firefox Problems[/URL] … | |
coming up in a week or so, I will be taking the AP Computer Science A Exam. I'm getting a little nervous about it. Has anyone ever taken this? What did you think about it? Anything in particular that I should really study up on? I have a book on … | |
Hi everyone! I am trying to develop an application to communicate with a Microsoft Acces database. For doing that I import the java.sql package to use the DrvierManager class to get a connection. The problem seems to be the application doesnot find the java.sql package. I have the 1.4.2_08 version.. … | |
can someone explain to me how i can go about implementing a string from a jtextfield and storing it to a file please. I would really appreciate some sample code on this one. Thank you | |
i have a sseacrh mode for a mobile phone and i wnat to create the results of query as options so they are selectable, so that when a user selects the option they are taken to that page how do i do this?? do i use a similar code as: … | |
I have a problem like this : I have an XML file containing some records and I wants them to store in a list of objects. So first I have to create objects from this XML file. But I don't know how to create object from XML file. If anyone … | |
Hi, here i enclosed my coding.i want the dom objects price,qty,oselect,name,sku and upc in the html body tag so that it can be submitted into another pages. here i want each and every element in each row to be collected and sent to the next place not the last element … | |
Thanks for reading my post. I would like to make a maze of pacman game with Java. I just want to load the maze from txt file, "pacman.txt" ,into program and show it upon the screen with applet. Usually, maze part would not be made or read in my way, … | |
I have a SQL query: SELECT * FROM Job_Request_Record, Requester_Record WHERE Job_Request_Record.Job_Requester_ID=Requester_Reco rd.Requester_ID; if i want to call an attribute from Job_Request_Record table e.g. rs.getString("ID")is it valid? or anything else. please help. Also, is it possible to have a create view table in ms access 2003? | |
hi guys found anotehr probem with my code, i have created a wml page which users input a search criteria, this is then apssed onto a jsp page which prints the value in teh jsp page though it doesnt print the parametr value and prints out null code is: <b><big> … | |
I can't get this code to compile, and I'm really pissed....Someone please help: [Code] import java.io.*; import java.util.*; import static java.util.concurrent.TimeUnit.*; public class ScheduleTester { public static void main(String[] args) { /** Get a scheduler **/ ScheduledExecutorServer scheduler = Executors.newSingleThreadScheduledExecutor(); /** Get a handle, starting now, with a 10 second … | |
Hey all, For sort of a final project, I want to build a program in Java (if it's possible) that works much like the GMail Notifier except I want to make it popup a notification if I receive a new email in my yahoo, hotmail, or google accounts. Does anybody … | |
hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much apprieciated or can ne1 give me some complted java code to look at | |
Working on a problem which uses a main only to implement Selection Sort. You enter arbitrary amount of integers and when the program runs it spits out the integers in increasing order. So the output would be something like this: Enter Integers to sort: 3 > 1 > 8 > … | |
hi just wondering if anyone can help me out. i need to create a loop to display 50 roll of two dice?? i keep getting an infinate loop and i don't know how to limit it to 50..... | |
I am in the process of learning JSP and my question is how do I check to see if a variable exists? The equivalent of this in php would be [php]if (isset($_POST['someVar']))[/php] or [php]if (isset($_GET['someVar']))[/php] any and all help would be appreciated! | |
hi, i have been asked to create a class, TestStudentContactDetails, which uses another classes method. the first class StudentContactDetails contains a method emailAddress(String RegNumber, String Course). This method takes the Course code supplied and opens a csv file stored at c:\UserFiles. It then searches the file for an entry corresponding … | |
When I open a Java Program, I want a method which returns true if the program is already running, and false otherwise. Is there a way to check for this? For example, say we open our web browser, the first time we open it, i want the method to return … | |
Hi Everybody, I was wondering if anybody knew if you can controll hardware with Java (open the CD drive, etc.). Thank you in advanced, C++ | |
Anyone know how to remove an object at a particular index from an array? Im doing a Noah's Ark project for my class and Im using an Array to hold the abstract animal class and once an animal dies, I have to remove it from the list. However I can't … | |
What development kit is the most widely used? Which is the easiest to use? Thanks in advance | |
1) I've a form that takes some input (various fields) I must use those fields as fields of a record of a simple XML database file. Mi xml file is like: <database> <record id="1"> ...my fields... </record> <record id="2"> ...my fields... </record> ... </database> I simply must add a "new … | |
Thing is I want a small painted ball to travel from point A to Point B combined with a timer so I can see it move. I know the mathematical side of the problem and have come up with this: int abX = pointA.getX() - bointB.getX(); // abX is the … | |
I need to find the square root of the following numbers 0,2,4,6,8,10,12,14,16,18,20 I know how to use the square root method I know how to use the loop function to find it for all numbers If I just wanted to print the numbers I can do this What I cant … | |
i had an eariler problem and posted it here [url]http://www.daniweb.com/techtalkforums/thread22426.html[/url] I have to read a file in format char, int, string, string string(but i dont know how many strings(words are on the end). I can get the char and int(the code is on the link above) and one strings(word) but … | |
Hi Everybody, I was wondering if there was a way to take a string in a java project and put it in the username field (like the field on [url]http://www.inquiryBio.com/WEBPROTECT-job.htm[/url] ) of another program. I think you may have to access another class somewhere else.Just so you know... I'm doing … | |
This is kind of a weird senario. This question was at the java state championship I was at a few weeks ago. Here was the question: Which type of class cannot be instantiated: abstract static (choices I can't remember..they were wrong) Would both abstract and static be correct answers? I've … | |
I've a problem with some code, this is the "core" of the code: [CODE] File xmldocFile = new File(xmlFile); File schemaFile = new File(xsdFile); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(true); SchemaFactory sf = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); Schema mySchema = sf.newSchema(schemaFile); dbf.setSchema(mySchema); DocumentBuilder db = dbf.newDocumentBuilder(); ErrorChecker errors = new ErrorChecker(); db.setErrorHandler(errors); … |
The End.