35,618 Topics

Member Avatar for
Member Avatar for herious89

please help me with my codes, it doesnt work somehow [CODE]import java.util.Scanner; public class calculateE { public static long factorial( int n ) { if( n <= 1 ) // base case return 1; else return n * factorial( n - 1 ); } public static void main( String [ …

Member Avatar for ejosiah
-2
96
Member Avatar for darsha

[QUOTE]i am trying to implement a fitness function for GA. i got a code written in python. i don't have any idea about python. can someone help me to convert it into java the code is here [/QUOTE] [CODE]# there are many ways to do an eigenvalue decomp, this is …

Member Avatar for FALL3N
0
571
Member Avatar for Hussam Alahmadi

i Write a program to check whether a matrix is an identity matrix but i do not know how to find it plz help me this my code [CODE]package javaapplication162; import java.util.Scanner; public class JavaApplication162 { public static void main(String[] args) { Scanner input = new Scanner (System.in) ; int …

Member Avatar for JamesCherrill
0
2K
Member Avatar for M.Waqas Aslam

hello ! basically i am working on .net , but now i want to learn java , is there any software like visual studio for .net .if yes then please can any one tell me or provide me any helpful link. Best Regards M.Waqas Aslam

Member Avatar for M.Waqas Aslam
0
176
Member Avatar for JamesCherrill

What (if anything) is the difference between these two? [CODE]String[] sa = {"ABC"}; String[] sa = new String [] {"ABC"};[/CODE]

Member Avatar for JamesCherrill
0
182
Member Avatar for nickliutw

I'm creating a program which has data in the linklist. I'm trying to print out the element in the linklist from head to tail and tail to end, but for some reason, I run into some compiler error. I don't know why it won't let me call the hasPrevious and …

Member Avatar for dantinkakkar
0
151
Member Avatar for anithajerome

Hi, I store images in my MYSQL database. I need to retrieve that image to my jsp along with datas.Response.write() function only displays the picture and not the data. How to do that?

Member Avatar for archie.herbias
0
118
Member Avatar for EddieC

GUIdancer 3.2, the latest version of flagship automated GUI testing tool from Bredex, now "officially" supports Windows 7 and Vista, and includes additional enhancements to its library of pre-built test actions. It began shipping on Nov. 3. Before you decide that US$5785 is too much to pay for an automated …

Member Avatar for amilyjoe
-2
361
Member Avatar for xcrypted1

Hi everyone, I am working on a problem as follows: Write a program that draws a circle with radius 100 and center (200, 200). Ask the user to specify the x- and y-coordinates of a point. Draw the point as a small circle. If the point lies inside the circle, …

Member Avatar for xcrypted1
0
2K
Member Avatar for dcalladi

Hi Guys, I'm looking the syntax for a input mask that will allow me to input 1.23, 12.34, 123.45 into the JFormattedTextField i found something like ###.## but that doesn't work but something like ###-## wud work. just wondering if anyone knows how to do this with a mask or …

Member Avatar for mKorbel
0
351
Member Avatar for lassy85

Can anyone assist me with the GUI for this program. I have tried several times will little luck. Here is the source code. Any help would be greatly appreciated. [CODE]import java.text.DecimalFormat; import javax.swing.JFrame; public class Inventory1 { public static void main(String[] args) { // Information on the Cds used Cd …

Member Avatar for lassy85
0
175
Member Avatar for jeffrey o

when i compiple this using rmiregistry, javac for HelloServer2 and HelloClient it says: I've attached all files as well java.rmi.NotBoundException: ReceiveMessageInterface <<No stacktrace available>> [CODE] import java.rmi.*; import java.rmi.registry.*; import java.rmi.server.*; import java.net.*; import java.util.Random; public class HelloServer2 extends java.rmi.server.UnicastRemoteObject implements ReceiveMessageInterface { String address; Registry registry; int a[]=new int[6]; …

0
139
Member Avatar for Syrne

Hi there, so I'm currently studying Java at my University and as of right now we're working on Linked Lists, Array lists, Array Deques, etc. As part of this lesson, we're being told to write our own versions, both recursive and iterative, of the predefined java functions for its corresponding …

Member Avatar for hfx642
0
224
Member Avatar for Murphyv10

Hello all. Can i get some help with my homework please. Im quite literally staring at a blan screen with very little done. Ive been quite sick recently and lost ground with the class. Ive watched You Tube videos and read oop books but to avail. I have to make …

Member Avatar for hfx642
0
84
Member Avatar for AbdullahJava

I don't know why it doesn't compile ! ! [CODE] import java.util.Scanner; public class Beach { public static void main (String [] args) { Scanner input = new Scanner (System.in); System.out.println("Enter the weather Hot or Cold"); String A; A = input.next(); System.out.println("Enter the type of day Sunny or Windy or …

Member Avatar for Philippe.Lahaie
0
85
Member Avatar for manoj_93

I am trying to calculate the number of code points that are present in a file, but it always showing me the number of characters being used. I am using string buffer to read the file, so I come to this part f d code [code]while ((sCurrentLine = br.readLine()) != …

Member Avatar for ~s.o.s~
0
121
Member Avatar for nilay84

Can anyone figure out why the following code is not showing the menubar when it is run in eclipse. import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.*; public class MenuExample { Display display; Shell shell; Menu menu, fileMenu, editMenu,viewMenu; public MenuExample() { display = new Display(); shell = new Shell(display); shell.setText("Menu Example"); shell.setSize(300, 400); …

Member Avatar for FALL3N
0
380
Member Avatar for clapton

Hi. I'm a student and I need write a programe bank application in java . I must write a program that the customer could withdraw and deposit from his account.I need a few class? my professor said me that it's very simple but it's dificullte for me. you can help …

Member Avatar for stultuske
0
199
Member Avatar for jarograv

I currently have this code: [CODE]import java.util.Random; import java.io.*; public class randomdwarf { public static void main(String[]args)throws IOException { String dwarves[]= {"Dopey", "Sneezy", "Happy", "Sleepy", "Grumpy", "Bashful", "Doc"}; Random generator = new Random(); int randomIndex = generator.nextInt( 7 ); System.out.println(dwarves[randomIndex]); Runtime.getRuntime().exec("H:\\Profile\\Desktop\\dwarves\\Doc.jpeg"); } }[/CODE] It is a very simple code that …

Member Avatar for Philippe.Lahaie
0
190
Member Avatar for geojia

Hi gurus, this is a homework assignment on finding all closest pairs. I used a quad tree for my algorithm and its running time is compared to the naive algorithm. (I didn't use the java quad tree because I didn't know it existed...) My problem right now is that after …

Member Avatar for rubberman
0
218
Member Avatar for herious89

Hi im trying to calculate the constant e, this is my codes, the program doesnt output correct value, im new to java, please help [CODE]import java.util.Scanner; public class calculateE { public static long factorial( int n ) { if( n <= 1 ) // base case return 1; else return …

Member Avatar for rubberman
0
364
Member Avatar for freedomflyer

Hello everyone. I have a TreeSet<State> that I want to iterator over in order to change the States within the TreeSet (more specifically, a private subclass within each state). However, I will most likely run into problems as I do something like this, or something to this effect: [CODE]for(State s …

Member Avatar for freedomflyer
0
1K
Member Avatar for bcain2121

Hello there. I am writing a game in java for a class of mine but i am getting this bugger ass error and i cant find it. Can someone help me? The whole project including all classes and such is located in the .zip you can download. I swear it …

Member Avatar for JamesCherrill
0
287
Member Avatar for riahc3

Hey I am having problems making a exact copy of a file. It seems that it changes the headers of the file. I tried using the Apache fileutils copyfile method but it seems to change the header completely. The rest of the file looks pretty much OK. I think it …

Member Avatar for riahc3
0
237
Member Avatar for riahc3

Hey I have a FTP server with this [url]ftp://192.168.100.2/folder/[/url] And I have something like anotherfolder: afolderinsidethatone: file1.bin file2.bin file.txt I want to pass all of that to the ftp server so it takes this form: [url]ftp://192.168.100.2/folder/anotherfolder/[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/file1.bin[/url] [url]ftp://192.168.100.2/folder/anotherfolder/afolderinsidethatone/file2.bin[/url] [url]ftp://192.168.100.2/folder/anotherfolder/file.txt[/url] I have this code: [code] public void subidaftp(String ip, String …

Member Avatar for riahc3
0
216
Member Avatar for hurrycart

Hello people. I'm designing a little app, and due to my lack of XP, I hope for some advices on how to deploy it. The App: It's simple Java app. There are many sub-functionalities" like: logging, sending a log via email, error handling, and others about XML technology. But to …

Member Avatar for stultuske
0
129
Member Avatar for 1bung100

I have an xml having same tags (<value> tag) as given below: [CODE]<number> <type>decimal</type> <value>12</value> <value>14</value> </number>[/CODE] I am trying to parse using either Digester or JAXB (without Schema). What I have done is I have created a java class that will map with the given xml. For this I …

Member Avatar for 1bung100
0
2K
Member Avatar for 47pirates

HOw can i private chat with logged in users from a group chat? HOw can i begin the proces?

Member Avatar for dantinkakkar
0
145
Member Avatar for liphoso

with integer arrays when i add them i can have code that looks like this result[0] = array[0] + array2[0] all the arrays being of integer type now if my arrays are of Huge type and i would like to get their sum, how would i do that? this is …

Member Avatar for stultuske
0
245
Member Avatar for konman795

Hello all, I have an assignment in which I need to subclass and implement an abstract method (java.io.OutputStream) to create an output stream called NumStream. The NumStream class converts digits to strings. We are given most of the code it seems and I need to only implement one area. It …

Member Avatar for ztini
0
233

The End.