32,204 Topics
| |
Hi, I have a quick question. Why would I be getting this: Ljava.lang.String;@24c21495 instead of the information at that address? I have println as my system.out. I am not sure how to format a String[] to make sure I get the information rather than the address. Thank you, lynnajoe | |
All I want to do is have my GUI .java program compile code that the user specifies. [CODE] Process p = Runtime.getRuntime().exec("javac theirJavaFileName.java"); [/CODE] Whenever I run this, I simply get: [CODE] java.io.IOException: Cannot run program "javac theirJavaFileName.java" CreateProcess error=2, The system cannot find the file specified [/CODE] When I … | |
[CODE] public static void main(String[] args) { Scanner scan = new Scanner(System.in); String word, end; int length = 1; //length of int is determined here so it can be incremented in loop System.out.println("Enter a word: "); word = scan.next(); while (1 == 1) { end = word.substring (word.length()-length); System.out.print (end … | |
I'm getting errors when I try to compile this code: [CODE]public class EmployeePayRoll { /*** Class Constants ***/ /*** Defaults ***/ public static final String DEFAULT_EMPLOYEE_NAME = "Employee"; public static final double DEFAULT_PAY_RATE = 10.00; public static final double DEFAULT_HOURS_WORKED = 40.0; /*** Minimums/Maximums ***/ public static final double MINIMUM_PAY_RATE … | |
hey there. I have the following code. I am trying to build an applet that displays all possible (92) ways of arranging eight queens on a chess board with no two of them on the same column, row, or diagonal. I built this as an application and it ran fine. … | |
In C++ I'm able to do something like this [CODE](some_condition)? function1():function2();[/CODE] When i tried the same thing in Java it's not possible. It wants some variable to hold the result even though the return type of function1 and function2 are void. Is there any other way to do it other … | |
I'm working on a small game in my free time as a proof-of-concept to myself that I'm capable of learning Java, but I've been stumped on an issue for the last week or two involving the instance of KeyListener I created for my project. Basically, the game has a player … | |
can anyone help me with this java coursework please? i am lost and don't know what to do and where to start. this is coursework, implement a peice of software suitable for use by a cinema. the system should be capable of providing information about films currently showing, and of … | |
Hi, Yes, I am sure you can tell that I am new. I have a few question and hope someone will answer them. 1)I am a little confused as to where to put certain code. If I am doing inventory and I need to have an array does it go … | |
I made this simple program that prints out all the factors of a given number. The only problem is that it prints out the numbers in different order...For example: factors of 12: 1*12 2*6 3*4 but this is what my program prints out: 1*12 2*6 3*4 [B]4*3 6*2 12*1[/B] It's … | |
SEN 964 Object-Oriented Design in Java Assignment #2: ITU wants you write some classes for their Personnel Record System. To make it simple, consider only 4 classes: Person, Employee, Instructor and Student. The following figure illustrates the relationship between these 4 classes. The Person class is the parent class of … | |
Solves simple string-based expressions. Currently only supports integers, but can easily be expanded to support float-types. | |
pls i need help after i have compiled my java frame using the awt package to display images the frame shows without the image and after compiling an animation program, the frame still shows without the animation. | |
Hello .. I am trying to open an encrypted file, and then pass it to my decryption method to decrypt it and display the text on the screen .. I'm getting a null! This is my decrypt code: [CODE] public String decrypt(String encrypted) { StringBuilder decryption = new StringBuilder(); for(int … | |
How to add Button in JTable in swings | |
Can any one suggest how to proceed with this. On clicking on print button it should start printing on the console while the other button end is clicked it should stop printing. When print button is clicked end button click is not recognised until process is print process is completed | |
Hi All, I need ask something on the iReport I already set a field called country and the data pull from the database so it like that $F{country} the country = "KO" detected change to "KOREAN" my statement is like this but come out error If $F{country} = 'KO' { … | |
I have to draw a Circular gauge using Java Graphics. Somewhat similar to the attached image, the circular gauge without the black border as in image. I tried to use two methodologies but none of them is working perfectly Firstly, I tried to draw everything using Java Graphics and then … | |
Hello, I am making a simple program that has you select Bible chapters and verses. I have all the chapters and verses in separate text files. I moved them into my source package. I am having trouble finding the code to put in the program so that java will open … | |
Check this out. Open up any website (one with many pictures is better) and, after loading it, paste this code in the address bar: [code]javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0);[/code] :) | |
Hi I want to know that howmay type of java and also that what is the use of different type of java? | |
Dear all, I have using db operations such as insert,update,select,delete in my program .I have perform this operation using the prepared statement. How to avoid the sql injection in my java program.? *)I want to know functions to avoid the escape characters in java ? *)Did any one know what … | |
| The objective of my program is to sort a file of students in order from a-z using arrays. I'm using selection sort method but for some reason my code is matching what i want. for example: Enter name of a file of Students: student10.txt In forward order, students are: Sally … |
Ok, so you know how, if we want to output the elements of an array to the screen, we have to make a for loop right? So I have the following code... [CODE] char array[] = new char [10]; array[0] = '1'; array[1] = '2'; . . . . array[9] … | |
Hiii all I am using java 1.6 and RXTXComm package (Javax.comm) package. I can read data from a electronic weighing machine. Now I have to set the weight as zero. I can tare this weight by sending T command to serial port. I had tried several times but no response … | |
I need to open a serial port on Windows XP. I'm pretty limited on programming languages but can code Java and C. [B]Javax.comm[/B] package is no longer supported - third party isn't very good [I]either[/I] :S so [COLOR="Red"]how[/COLOR] do I open a port? at the moment all I want to … | |
Q: A local company has the following monthly charges for snowclearing services: $250 for 0-5 visits $250 + $55 for each visit over 55 13% tax is to be charged in each case if previous balance is not zero, intrest of 4% of that balance is to be charged. theres … | |
Hello All, I am beginner to Java and am in the process of learning. I am currently focusing on understanding the Thread concept. Went through various materials available in the internet, but not sure whether I understood it(thread concept) clearly. Here is what I have written: A simple java applet … | |
I can't seem to debug these run-time errors. help would be appreciated. [ICODE] Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:840) at java.util.Scanner.next(Scanner.java:1461) at java.util.Scanner.nextInt(Scanner.java:2091) at java.util.Scanner.nextInt(Scanner.java:2050) at lab2.readFile(lab2.java:92) at lab2.main(lab2.java:79) [/ICODE] [CODE] import java.io.*; import java.util.*; class Customer { int account_id; char[] ch1 = new char[20]; String name = new … | |
Hi all, Please i need to know how to install fxtrade in myeclipse . Thank you in advance |
The End.