32,199 Topics

Member Avatar for
Member Avatar for BuhRock

How would I go about converting a string to an integer? Say someone enters a 4 digit string. Like 1234. Could I use the place of each digit and work with it? Pretty much, I wanna get 1 from the string "1234" and put it in a variable. Then get …

Member Avatar for coil
0
176
Member Avatar for WaterBleu

Hi All, I'm looking to create video transition using java. I'm wondering if JMF is a good way to go..since I had a bad experience finding competiable format that is supported by JMF. The idea of my project is basically feed any two given video. when reach to the end …

0
49
Member Avatar for RetNaRome

Okay so I have an array of Objects.. My goal is to get the output to print every "Song" the user inputs But for some reason only the last song in the array is printing which is confusing me [CODE] import java.util.*; import java.util.Arrays; public class SongRunner1 { public static …

Member Avatar for Slimmy
0
131
Member Avatar for frankel81

I just dont know where to start on this. Can anyone lend me a hand? 4- Write a Java program to create the following array that hold the salaries of employees: 1550.8 2439.5 1800.75 2890.0 The company wants to give the employees a bonus of 30% of their initial salary, …

Member Avatar for plasticfood
0
151
Member Avatar for janakijanu

i want project titles related to computer science in latest language but i want to do projects in .net & java

Member Avatar for eliezahorre
-1
120
Member Avatar for eliezahorre

hi, so i've been looking for a string matching algorithm that gives me a "rating" based on how close the 2 strings match.. luckily, i googled and read this article: [URL="http://www.catalysoft.com/articles/strikeamatch.html"]how to strike a match[/URL] here's the original java class code [CODE=java] package strike_a_match; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; …

Member Avatar for eliezahorre
0
1K
Member Avatar for Omona

Hello, First of all, I hope my post isn't breaking any of the forums' rules Here's my code so far [CODE]import java.util.Scanner; /** * * @author user */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner sc = …

Member Avatar for Gerbiler
0
536
Member Avatar for eman 22

my program doesn't work correctly because this exception [CODE]while(count<sharedBetweenThreads.size()){ for (int i = 0; (i < ourThreads.length) && count < sharedBetweenThreads.size(); i++) { if (ourThreads[i].isAlive() == false) { ourThreads[i].start(); } }[/CODE] if the length of an array of threads(ourthreads) equal 2. the two threads start and then the program check …

Member Avatar for masijade
0
80
Member Avatar for steveh000

Hi Guys I am a Computer Science student at University and am looking for some ideas on a project that I have to complete. I have to come up with an hypothetical Software engineering problem in Java , I have to create a bad way of solving it and then …

Member Avatar for skhenry
0
183
Member Avatar for sam1

hi, I am doing an instant chat system using java client and server architecture. currently im implementing the server side of it. my question is: Should i design a gui for the server side as well? if yes what kind of functionality should I include? thanks

Member Avatar for Arul412
0
209
Member Avatar for XMasterrrr

hello guys, like the thread title i want the best book to learn J2ME with no java experience and i got some knowladge in c/c++ and can i finsh that's book in 2 weeks maximum? thanks my regards... X

Member Avatar for peter_budo
0
67
Member Avatar for George2

Hello everyone, Please look at the following code block, [code] public void Foo() { synchronized (lock) { //do task 1 try { lock.wait(); } catch (InterruptedException e) { // TODO Auto-generated catch lock e.printStackTrace(); } //do task 2 } } [/code] Suppose multiple threads have entered the synchronized block one …

Member Avatar for anand.g
0
183
Member Avatar for lh8ca

Hi, I'm having trouble finding the right code to write a short method to create a greyscale SImage from an array of ints representing text in binary form. For example, given the array [0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 1], an …

Member Avatar for masijade
0
82
Member Avatar for takercena

[CODE] for(int x = 0; x < w; x++) { for(int y = 0; y < h; y++) { int rgb = bimg.getRGB(x,y); //byte r = (byte) ((rgb & 0x00ff0000) >> 16); //byte g = (byte) ((rgb & 0x0000ff00) >> 8); //byte b = (byte) (rgb & 0x000000ff); pixels[x][y] = …

Member Avatar for masijade
0
295
Member Avatar for masamune

Hello there Can anyone lend me a hand with this question? i'm seriously not looking for anyone to solve it for me, just a simple explaination will do. I'm having trouble knowing where to start, im just a beginner and this question really caught me by surprise, I don't even …

Member Avatar for jon.kiparsky
0
106
Member Avatar for tshudyb

I have created a JFrame contaning a JTabbedPane. What I am trying to accomplish is the changing of tabs within my 'addCustomer()' class via an ActionListener. What I was trying was to call the method 'setTab(int c)' located in my 'BoatLog()' class, from my 'addCustomer()' class to set the index …

Member Avatar for tshudyb
0
1K
Member Avatar for fenomenal

[ICODE]public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Input an integer: "); int n = in.nextInt(); int d = 1; int temp = n; while (temp > 9) { temp = temp / 10; d++; } System.out.println(n + " can be expressed in " + d + …

Member Avatar for Gerbiler
0
103
Member Avatar for LianaN

Hi! There is JTree component that I want to fill from the database. New nodes can be dynamically added to this tree. I need a procedure that will recursively traverse a tree. My problem is that [B]all nodes are added to the root node[/B], and sub-trees are not created. I've …

Member Avatar for LianaN
0
377
Member Avatar for OuSa
Member Avatar for Katana24

Hello - I have created a program which calculates the value of PI. All the calculations work well but the aim of the program is to get the user to input a number - say 7 and my program will print the value of PI to 7 decimal places. I …

Member Avatar for masijade
0
106
Member Avatar for jishent

[CODE]import java.io.*;public class Ex9a{ public void rollBack(BufferedReader in) throws IOException{ String line=""; if((line=in.readLine())!=null){ rollBack(in); } if(line!=null&&!"".equals(line)){ System.out.println(line); } } public static void main(String[] args) throws FileNotFoundException{ PrintStream out; Ex9a t=new Ex9a(); out = new PrintStream(new FileOutputStream("outfile.txt")); out.println(ioe); out.close( ); String fileName="infile.txt"; try{ BufferedReader in=new BufferedReader(new FileReader(fileName)); t.rollBack(in); }catch(IOException ioe){ System.out.println(ioe); …

Member Avatar for jon.kiparsky
0
382
Member Avatar for Oppression

Greetings reader, Thank you for your time. This post contains 2 Inquiries. My resources: BlueJ [B]Inquire 1:[/B] I would like to know what methods (if any) I can use to save anything generated by my BlueJ (e.g returned ints)to my PC's memory without having to create a .txt file somewhere, …

Member Avatar for peter_budo
0
204
Member Avatar for ARaza110

Vector v = new Vector(); i<10; v.add(new Integer(i));// what does this lien do? I dont understand, what does calling (`new Integer()`) do? Is is calling the constructor and passing the value i in it. Why can't we just pass the value i directly and add it in the vector.

Member Avatar for ARaza110
0
128
Member Avatar for p4tm4n

Hello, for my University i need to develop a facebook application with JSP. So i wondered if anyone knows a Library (Like the official one for PHP) or any provide any other kind of help/tip for me? I found socialjava.com but it doesn't seem to work anymore. Or am i …

0
49
Member Avatar for geasssos

I need to do a program about: ask the user keep typing word until the word "stop" has been typed. my teacher said we need to add a class called Input. and he give the code to me. I have no idea how to use this code..any one can help? …

Member Avatar for geasssos
0
101
Member Avatar for Dean_Grobler

Hi there, This is just going to be a quick question. Also just note that I am i some "remote location" so I cant even show you my code. But what I want to know is this: Say you have a package called "myPackage" and inside that you have 2 …

Member Avatar for JamesCherrill
0
141
Member Avatar for laupkram

Hello, I would ask if there is a possible method that would return a String in JAVA that I can retrieve the SQL code of any table on my embedded JAVA DB in my application. It is like the function of the phpmyadmin where in you can import a certain …

Member Avatar for masijade
0
94
Member Avatar for spades0001

I'm supposed to create methods, but I don't know how to :(. All inputs and outputs should be done in the main method and calls to the methods should be done for computation. Can someone please show me how? Thanks. I have to do it on this program: (Actually there's …

Member Avatar for laupkram
0
111
Member Avatar for DallasFan3

Ok, I have been trying to write a program that will read in a list of positive integers (including zero) and display some statistics regarding the integers. This is what I have to do, [ICODE]After you have placed all of the integers into an array, your program should perform the …

Member Avatar for laupkram
0
178
Member Avatar for YairHa

Hi, I would like to FTP a file that only part of the filename is known. The name is something like “ClimateData2010042207XXXX.xls” performing the following does not work: [CODE] FTPClient client = new FTPClient(); FileOutputStream fos = null; client.connect("ftp.domain.com"); client.login("admin", "secret"); String filename = “ClimateData2010042207*.xls”; fos = new FileOutputStream(filename); client.retrieveFile("/" …

Member Avatar for zenfaraad
0
562

The End.