32,204 Topics
| |
I need to write a program that gets inputted files from arguments written from command prompt and prints a random line from it. I don't really know how many exceptions i need and I don't really understand the logic of getting the line from the file. Please help me. | |
What is wrong with this code. when it do system.out.println(matrix[0][0] i should get 1 char i get the entire line. [code] int r =Integer.parseInt(line.substring(0)); int c = 10; String[][] matrix = new String[r][c]; while (line !=null) { for(int i =0; i< r; i++) { for (int j =0; j< c; … | |
Can someone please help me out? What are the pros and cons of C++ and Java? I've always been told that C++ is the ultimate programming language. It's powerful, fast, and used to run huge programs. But since Java is a close rival to C++, I was wondering what are … | |
I have failed my java programming class but I am retaking it in February. I have untill then to figure out how the heck to do all this. I have uploaded my program, it is an inventory program for dvds. I was supposed to create a GUI that I thought … | |
okay so i am very new to java, and my teacher is not offering much help. i have an outline of how my java program should look but i still need help!!!!!!!!!!!!!!!!!! by the way max misses is 3, and words im testing are landslide and air and fight. any … | |
I've benn working on this problem for a week. I still can't get it remotely closely to working Can anyone HELP :'( me ---------------------------------------------------------------------------- The task is to write a program which reports the amount of time required by various sorting algorithms to sort different numbers of data values. Then, … | |
Hello every one , I am new to java learning from different example i am useing bluej. Any help would be much appreciated. I just dont know where to start i done few programs my friend show me that on her Pc but i didnt understand very well. so i … | |
Hi! I'm trying to write a method that finds the index of a specified occurrence of a character in a given string using recursion. I've managed to count the number of times a character occurs in the string, but can't figure out how to find the index of a particular … | |
I have to create a database that implements an array that stores a persons first name and last name and zip code this is what i have so far for my individuals array public class IndividualsArray { private Individuals[] array; private int count; private int zipCode; public IndividualsArray () { … | |
I'm setting up a simple painter applett that uses a seperate frame class to control color and clear the screen. I've got all but the clear button working fine. After attempting several different methods I've settled on passing the address of the applett graphics object to the frame class and … | |
This class is moving too fast and I only know simple Java programming so far, but we're getting into multiple classes for this savings account program. If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life. ---Data • the identity number for … | |
Hi. I don't know whether this is the right place asking this question or no. I want to know, is it possible to use PHP code into JAVA code? if yes how? | |
I want to create a Log File that will keep record of each action taken by my crawler. It will also record errors occured .I want to make it Up to date for specific period of time. Please help me for that. | |
I'm trying to create simpel notebook for me to take down classnotes, using java swing & SQLite. This will even help me to learn more about swing & SQL . (I'm not sure whether it is possible or SQLites usage is good or not). So anyway i decided to use … | |
Hello Everyone, I've a problem with java & SQLServer 2005 interface, i installed a SQLServer 2005 and SP2 software bundle to enable SQLServer to run on Windows Vista, i'm using the "Windows Authentication" in SQLServer 2005 which don't need the username or password, and i've the classpath to jar archive … | |
hi, is someone knows how to accept the entered values the table cells when i clicked a button, instead of using the setSurrenderXXXX() method. | |
i want move date whenever one perticular field gets some value... eg. if i have field name event and date .event is a select box . when approved is moved to event box todays date should move to date field. pls send me a javascript related to this | |
Note: I'm using a JList as an audio playlist. I was wondering if there was a way to automatically update a custom ListCellRenderer. Basically I ask is because within my ListCellRenderer I have an isPlaying item that will change the color of the object in my playlist that is playing, … | |
Hi all, i have to make an application that can take the user's input and finds out if the year is a leap year. The input has to be divisible by 4 and 400 but not by 100. This would then produce an answer if the user's input is true … | |
Hi everyone! I am working on a course project for a software engineering class that generally deals with "Usability of APIs". I have created some metrics that I wish to run a few Java APIs through and see how they measure up. To test out my metrics (for example, on … | |
Hello friends, I have a problem in my stock trading terminal . Its not working properly as what it should be . i think i got a problem with applet .. At the status bar,it says "Applet RTApplet started" .. how to solve this ?? can anybody help me please?? | |
Greetings to anyone who reads this post. Actually I needed a help. I need to write a program for the Internet Browser application but don't know where to begin at. Could anyone please help me providing the information on topics that I will have to know about. I intend to … | |
Hi I've two files for JDBC connectivity. 1)DBUtil.java - to establish DB connection using JDBC and close DB objects 2) GetEmpl.java - Uses DBUtil to connect to DB and retreives data. [code language=java] public class DBUtil { private static String dataSourceName = getJNDI(); private Connection conn = null; private PreparedStatement … | |
I've seen a lot of different possible ways to do so, but I was wondering what people thought the most efficient way was. | |
I have this method: [CODE] public String addBuddy(String buddyName, HashMap userList) { if(buddyList.contains(buddyName)) statusMessage = "Buddy already in list"; else if (!userList.containsKey(buddyName)) statusMessage = "No such user on server"; else buddyList.add(buddyName); statusMessage = "Buddy added"; return (statusMessage); }[/CODE] When I call this in my main how would i display the … | |
Does anyone know how I can import a List into a text file? Is there any difference if I try the same process in Groovy? | |
what is wrong with this code. it does not read the input file correctly. private void readFile() { String fName = "c:\\game.txt"; ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>(); { try { File file = new File(fName); Scanner in = new Scanner(file); // for ( int i = 0; i < matrix.size(); … | |
Hi all, I have a simple JFrame windows with two JLabel, two JTextField and two JButton. I use SpringLayout to display controls in on the frame. But when I run the application, the windows is displayed in a very small size. Only the two buttons are displayed. But when I … | |
why won't this work? i have a txt file that i need to read into a matrix. i want to read into a char array so i can analyze each char separate. String fname = "c:\\game.txt"; char[][] matrix = new char[4][4]; private void readFile() { try { Scanner s = … | |
Does any one know in which method the cursor in the dnd class is set, while dragging an object!! thanks lotts |
The End.