32,204 Topics
| |
Hi to all! Im having problem inserting ñ and Ñ in mysql using java. I did try to insert in mysql using CLI and it works ok but when I used it in my java it was replaced by other characters. does anyone have the same problem and have solved … | |
Ok I'm a VERY (stress the VERY) beginner programmer and I made a yahtzee game. Now, I'm trying to make a high score list so as to keep track of the high scores in my 1-player yahtzee game even after the applet is closed. I have one class called Yahtzee … | |
Please help! Im behind in my homework and dont really even understand it anyways. I cluelessly added the `addCoin("...");`, which i believe is correct. but I dont know what to add to the return statement for `public String toString( )` If you are willing to help, plz provide steps as … | |
Okay, you know when on like an alert window, or a form, one of the buttons automatically gets executed when you press enter, such as shown. [I]See Picture #1[/I] [i]So I was wondering[/i] how I could do this in Java for a both a JFrame and a JOptionPane. Thanks. arithehun … | |
I need to write a code in which i want to create each file for every iteration of a loop add data into the file. also the filename should change every time. for example: familyname1_parts.txt for 1 iteration for second familyname2.parts.txt for 2 iteration and so on.. [CODE]try { out … | |
Hello, I am working on a program that requires the splitting of a string (the string in question is "BSHDDBDSBSHHSBH") so that it can count the occurrences of each separate letter. The code I currently have is: [CODE] public static void countPercent(Scanner input) { String nucl = input.next(); int[] count … | |
I got a simple priority queue of <node> objects. [CODE] Priority Queue<node> queue = new Priority Queue<node>(n,compare);[/CODE] the node object has a few fields, one of them an int field called LB(lower bound) I've build a compare class so the queue would use my compare to sort itself. The problem … | |
for example, i have a txt file that reads: number of items: 2 number of zombies: 3 .... i want to write a method that increments just the numbers, and leave the "number of items" and "number of zombies" alone. is there any way to do this? i can easily … | |
in Stacks what will be the Postfix of this Infix 1. A +B / K - N * R 2. ( A + B ) / ( K-N ) * R 3. A / ( B + K / ( N - R )) 4. ( A + B ) … | |
I really need some help please, I really can't figure out how to do this. I have to take some commands from system.in and put them in a file. when the command 'print' appears I need to read that file and process it. after that I have to be able … | |
I want to use the tree in java but I found tree Set, Tree map I want to know each of them would be used and if I add element to the root how can I add element to this element. | |
| /*THIS PROGRAM PROMPTS THE USE TO INPUT ROOM NUMBERS AND THE FIRST INPUTTED NUMBER WILL BE "OCCUPIED" , AND IF THE ROOM NUMBER(IN THE FIRST INPUT) IS INPUTTED AGAIN AT THE SECOND INPUT IT WILL SAY THAT IT IS "NOT AVAILABLE" . . */ //Here is my code : [CODE]import … |
Hello everyone there. I have a problem with java exercise so can you help me? I would like you to show me detail and clear about all these exercise. 1. Write a console program to define and initialize a variable of type byte to 1, and then successively multiply it … | |
Hi there I'm writing to a file so that it creates a back log of the data and time i did something. I've got the program so it writes the data that is needed and also the date and time. the problem is if you use the program more then … | |
I currently have a program that takes a URL edits it and then opens IE with the new URL. What I also want is it to log in to that webpage once it is opened, but i cant seem to find a way to interact with the browser so the … | |
Hello, my code is [code]import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class LoadDriver { public static void main(String[] args) { Connection conn = null; try { // The newInstance() call is a work around for some // broken Java implementations Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (Exception ex) { System.out.println("daaaaaaaaaa"); // handle the … | |
This looks like a repeat of a previous thread, but I still haven't cracked it. I'm doing everything on a single Windows XP pc, so no servers or clever stuff involved. I blew the space on MS Access so I'm attempting to return to plan A of using MySQL. Installed:- … | |
i am a first year student and i dont have a clue whats going on. i keep getting this error:Exception in thread "main" java.lang.NoSuchMethodError: main this is the code i am using but i dont think its releated to this. [CODE]public class reverse { public static void main (String [] … | |
[code]import java.util.*; import java.util.Arrays; public class SongRunner1 { public static void main(String[] args){ String title; String artist; int time; int rating; String String1; Random r = new Random(); Scanner console = new Scanner(System.in); System.out.println("Welcome to your music storing program!"); System.out.println("How many songs will be inputted?"); int number = console.nextInt(); Songs[] … | |
Dear friends ....... I am doing a biometric project , so i need a Finger print recognition algorithm and its code in java....... So i request you to help me............ Anyway thank you May GOD bless you Thanks in advance. | |
Dear friends ....... I am doing a biometric project , so i need a face reconition algorithm and its code in java....... So i request you to help me............ Anyway thank you May GOD bless you Thanks in advance. | |
AUCTION.JAVA package English_Auction; /** * * */ public class Auction { // A unique identifying number. private final int number; // A description of the lot. private String description; // private int startPrice; // private int reserve; // The current highest bid for this lot. private Bid highbid; // private … | |
i m trying to send SMS using a java programe. this is my code, in this getPortIdentifier Instruction is not working [CODE]import javax.comm.*; import java.io.*; import java.awt.TextArea; import java.awt.event.*; import java.util.TooManyListenersException; /** A class that handles the details of a serial connection. Reads from one TextArea and writes to a … | |
Hi Guys, These generics are melting my brain.I'm trying to have a list superclass with an arraylist of type T. I then want to invoke the superclass constructor in the subclasses using the type I want to substitute for T, example Product. I'm getting type hiding warnings and quite a … | |
I'm not including code yet as to the fact I've restarted several times. I think if I can determine how to start I can make some headway. Here are my beginning instructions. High-level specifications Your project manager has assigned you the task of developing a subsystem that tracks the populations … | |
Hi - I'm making a program to calculate PI to n number of decimal places, the calculations are all going fine and now I want to combine values from two arrays into one 2D array for quick reference. I'm a-little confused on how to do this. It should go like … | |
Hey guys, I have a problem, I have to take a text and depending if a boolean - split_words is true or false I have to parse the text on some lines splitting the words or leaving them whole. for example, text is: This is the text I have to … | |
I need to create different strings inside a while loop, the problem is how to name them and not having them overwritten each time for ex: [CODE] while (i<10) { String x=scan.nextLine(); //here is the problem, x gets overwritten each time i++} [/CODE] Thank you in advance. | |
package sha; import java.security.MessageDigest; /** * * @author deepak */ public class Sha { public static void main(String[] args) throws Exception{ MessageDigest sha = MessageDigest.getInstance("SHA-1"); byte [] i1 = args[0].getBytes("UTF8"); sha.update(i1); byte[] hash = sha.digest(); System.out.println ("Result: Success"); // Display plain text and digest System.out.println ("Original plain text was : … | |
[CODE]mport java.net.*; import java.io.*; class Ur { public static void main(String[] arg) throws Exception { URL u = new URL("http://www.whitehouse.gov/"); InputStream ins = u.openStream(); InputStreamReader isr = new InputStreamReader(ins); BufferedReader whiteHouse = new BufferedReader(isr); System.out.println(whiteHouse.readLine()); } }[/CODE] It shows the error.. when i changed the site to [url]www.google[/url] .com \Program … |
The End.