35,618 Topics
![]() | |
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 [ … | |
[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 … | |
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 … | |
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 | |
What (if anything) is the difference between these two? [CODE]String[] sa = {"ABC"}; String[] sa = new String [] {"ABC"};[/CODE] | |
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 … | |
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? | |
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 … | |
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, … | |
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 … | |
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 … | |
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]; … | |
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 … ![]() | |
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 … ![]() | |
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 … | |
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()) != … | |
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); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
HOw can i private chat with logged in users from a group chat? HOw can i begin the proces? | |
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 … | |
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 … ![]() |
The End.