32,199 Topics
| |
part of the program i am creating requires me to print out all of the links from a desired webpage. I have absolutely no idea on how to go about this. help? thanks | |
Hey guys I have a quick question on my hw, I have found everything needed except the "unusual scores". this is the direction given: Determine which of the grades, if any, are "unusual" in the sense that their corresponding z-score is < -2.0 or > +2.0. A z-score is computed … | |
I am writing a game of three dimensional tic-tac-toe. I need to have a method that can look at the board, and determine if a player has won. Your requirement is that this method is passed an array that represents the board, and returns an answer that can be used … | |
how can i call data from usb to my "main" at desktop. Example i want to call the variable 'x' at my file in usb, then use it in my desktop file.. | |
Hi, I'm just learning to program and I'm stuck on a basic problem, printing today's date in a form typified by (e.g.) 28 February 2011 Java Syntax (Toggle Plain Text) import java.util.*; class Date { int day, month, year; } class PrintToday { static Date thisDay() { Date today = … | |
How do you determine what the main hard drive is? This is what I have: [CODE]filename="savefile2.txt";[/CODE] and this is pseudocode for what I want: [CODE]filename="MainDrive:/JavaProject/savefile2.txt";[/CODE] My problem with it is, what if C: isn't the name of a person's hard drive? F:\ for instance. And also, if the folder name … | |
[CODE] class Switch { public static void main(String args[ ]) { String season; int month =10; switch(month) { case 12: case 1: case 2: season = "Winter"; break; case 3: case 4: case 5: season = "Spring"; break; case 6: case 7: case 8: season = "Summer"; break; case 9: … | |
This program is supposed to take the array of command line arguments and sort them alphabetically. Problem is I'm getting an ArrayOutOfBoundsException somewhere. I also have a problem with the while loop. The way I've decided to alphabetize the array with looks a little bit shoddy. My plan was to … | |
I have a Java application which uses a MySQL select query i want to use java array elements for In condition.for eg [CODE]select * from table where shortcode IN (aray[]);[/CODE] is it posible to use java array in mysql | |
Hello all I am using reading a config file in which there is a entry [CODE]code_list="515,522,560,000" [/CODE] while i am reading this string in my java application and using split on it and then assigning it to a string[].it is giving null pointer exception.needed code is as follows [CODE] static … | |
Please Urgent help....! the difference between float and double... but a Detailed one.... because it makes me confusing and i'll be very grateful.... | |
..I am trying to create an ATM-like java applet program that will enable a user to check for their balance, make a deposit and withdraw a certain amount.. ..The program will require a swipe card number(as if it is was a real ATM) but should be already included in the … | |
[CODE]import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; import java.lang.*; class Main extends JFrame { public Main(String st) { setLayout(null); setDefaultCloseOperation(javax.swing. WindowConstants.DISPOSE_ON_CLOSE); JLabel lab=new JLabel("Welcome "+st+"!! \n Click OK to Continue"); JButton OK = new JButton("OK"); OK.setMnemonic('k'); OK.addActionListener( new ActionListener() { JButton OK; public void actionPerformed(ActionEvent e) { [COLOR="Red"] Main();[/COLOR] … | |
Hello everyone! :) Here I come to you again with a question. I need some ideas on how make a java program that can work with big numbers, without using special java API`s like java.util.BigInteger and java.util.BigDecimal. This program will be able to substract and concatenate. My idea would be … | |
I have a class file with my method to read for prime numbers in my text document, and then my main java file calls on it using the file input code. I am lost in my code, and not sure what is going wrong, because it just reads out 0 … | |
guys i really need your help about my project anyone can help me i will appreciate it because its due on 3/3/11. thank you and GOD bless! 1.Write a program that takes a one-line sentence as input and outputs the following response: If the sentence ends with a question mark … | |
hi i want to read barcode from tiff file (image) so what i do for that is there any library and sample code for that plz help thankx | |
Hey Guys, I am working on an assignment where we are supposed to output the date in different formats for example, month, date, year or date,month year, I have implemented a method to change for the arrangement of dates, It builds successfully but has errors when it runs plus it … | |
hi i have to read tif File using java file has 3 pages and take first two page of that file and create new tif file with different name can u suggest me how should i start | |
hi i am running a program using jdom. It compiles successfully but doesnot run. It gives an error "C:\ProgramFiles\Tomcat\tomcat-5.5.9\webapps\jsp-examples>java KmlSample Exception in thread "main" java.lang.NoClassDefFoundError: org/jdom/Content Caused by: java.lang.ClassNotFoundException: org.jdom.Content at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Could not … | |
i have a hash map in my application containing some key - values pair, i just want to compare previous value with current value of hash map and then move to next. then i wants to make next value as current and current value to previous and continue in this … | |
[B]How to clear the content of a JFrame? my code is something like this: there is a main window with buttons 1 and 2 (2 is for exit) when I click button 1, a new window should appear with lots of components , etc then inside it is a cancel … | |
This code randomly generates 4 lottery tickets and prints them on seperate lines. The code works, but what if I wanted this to print for 100 lottery tickets? Is there a way to write this with less lines of codes? Would using a for loop work? [CODE] import java.util.Collections; import … | |
Hello all...first-time poster here, and I was wondering if any of you fine folk can help me out with what is surely a simple task, but something very confusing for someone just starting off with Java. In a nutshell, I am creating a simple mobile game where a user is … | |
write a program to read in a list of exam scores (integer percentage in the range 0 TO 100) and to output the total number of grades as well as the number of grades in each letter- grade category (90-100=A, 80-89=B, 70-79=C, 60-69=D and 0-59=F) and what percentage of the … | |
It's only reading every other line. It's supposed to print out: 28 80.0 22 1 2 2 3 1 3 But it's only reading: 80.0 1 2 1 [CODE]//Load button - #=daynum, $=wallet, @=inventory, &=employees, !=customers if (btn2.getText().equals("Load")){ int id=0; File file = new File("savefile1.txt"); BufferedReader reader = null; try … | |
Hey guys, I have this Java code and I'm trying to convert it to MIPS. I've made an effort and I'm confused to what mistakes I've made. If anyone knows MIPS, I'd really appreciate some guidance! When ran in Java, I get these values: x = 10500531 y = -1374550272 … | |
[url]http://img838.imageshack.us/img838/2795/problemx.jpg[/url] I'm completely lost.. could anyone help me get started writing pseudocode? Thank you! | |
Hello all this is one that yes is home work but I really have no clue what to do with it. please can someone help. 23. What is the output generated by this code fragment? System.out.printf("%4.1f\n", 8.); System.out.printf("%,.1f\n", 1234.567); |
The End.