32,204 Topics

Member Avatar for
Member Avatar for jet101

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 …

Member Avatar for jet101
0
69
Member Avatar for firecy

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 …

Member Avatar for joehms22
0
538
Member Avatar for hoover_red_one

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 …

Member Avatar for joehms22
0
627
Member Avatar for arithehun

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 …

Member Avatar for arithehun
0
123
Member Avatar for palavi

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 …

Member Avatar for Linez
0
1K
Member Avatar for Rogue Hermit

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 …

Member Avatar for joehms22
0
102
Member Avatar for arthurr.ie

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 …

Member Avatar for jon.kiparsky
-1
143
Member Avatar for plasticfood

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 …

Member Avatar for plasticfood
0
109
Member Avatar for amras123

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 ) …

Member Avatar for peter_budo
0
60
Member Avatar for Alex86fire

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 …

0
70
Member Avatar for eman 22

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.

Member Avatar for masijade
0
91
Member Avatar for Codeslinger

/*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 …

Member Avatar for apines
0
107
Member Avatar for socheata

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 …

Member Avatar for apines
0
153
Member Avatar for ajst

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 …

Member Avatar for ajst
0
185
Member Avatar for ajst

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 …

Member Avatar for ajst
0
139
Member Avatar for taufiqbzz

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 …

Member Avatar for masijade
0
130
Member Avatar for StevePrim

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:- …

Member Avatar for masijade
0
293
Member Avatar for ronan269

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 [] …

Member Avatar for Abdel_eid
0
306
Member Avatar for RetNaRome

[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[] …

Member Avatar for javaAddict
0
486
Member Avatar for sijothomas

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.

Member Avatar for masijade
-1
56
Member Avatar for sijothomas

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.

Member Avatar for masijade
0
71
Member Avatar for dee2020

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 …

Member Avatar for dee2020
0
127
Member Avatar for Nidhi S.

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 …

0
61
Member Avatar for comSysStudent

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 …

0
68
Member Avatar for atticusMom

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 …

Member Avatar for quuba
0
338
Member Avatar for Katana24

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 …

Member Avatar for Katana24
0
2K
Member Avatar for Alex86fire

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 …

Member Avatar for Alex86fire
0
161
Member Avatar for mar1obaz

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.

Member Avatar for mar1obaz
0
103
Member Avatar for Deepak20

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 : …

Member Avatar for Deepak20
0
203
Member Avatar for natha_peepli

[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 …

Member Avatar for natha_peepli
0
172

The End.