32,204 Topics

Member Avatar for
Member Avatar for lynnajoe

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

Member Avatar for lynnajoe
0
99
Member Avatar for ToXSiK

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 …

Member Avatar for mKorbel
0
134
Member Avatar for asif49

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

Member Avatar for asif49
0
96
Member Avatar for SMITA6076

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 …

Member Avatar for jon.kiparsky
0
290
Member Avatar for bibiki

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

Member Avatar for mKorbel
0
113
Member Avatar for subith86

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 …

Member Avatar for subith86
0
130
Member Avatar for SavnetSinn

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 …

Member Avatar for jon.kiparsky
0
150
Member Avatar for abz2010

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 …

Member Avatar for jon.kiparsky
0
134
Member Avatar for lynnajoe

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 …

Member Avatar for jon.kiparsky
0
84
Member Avatar for server_crash

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 …

Member Avatar for Momerath
0
158
Member Avatar for bindhub

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 …

Member Avatar for stultuske
-3
1K
Member Avatar for Alex Edwards

Solves simple string-based expressions. Currently only supports integers, but can easily be expanded to support float-types.

Member Avatar for Taywin
1
3K
Member Avatar for Harekc

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.

Member Avatar for Taywin
0
121
Member Avatar for altayar

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 …

Member Avatar for Taywin
0
101
Member Avatar for bharath54321
Member Avatar for l_savitha

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

Member Avatar for l_savitha
0
117
Member Avatar for gingank

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' { …

0
76
Member Avatar for gunjannigam

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 …

Member Avatar for gunjannigam
0
491
Member Avatar for caswimmer2011

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 …

Member Avatar for vadayattu
0
223
Member Avatar for 'Stein

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] :)

Member Avatar for susheelsundar
0
591
Member Avatar for Rakesh Mall

Hi I want to know that howmay type of java and also that what is the use of different type of java?

Member Avatar for Zorbie
0
85
Member Avatar for prem2

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 …

Member Avatar for Taywin
0
1K
Member Avatar for Gsterminator

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 …

Member Avatar for Taywin
0
139
Member Avatar for insanely_sane

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

Member Avatar for jon.kiparsky
0
2K
Member Avatar for azibhai4u

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 …

Member Avatar for ferdousKhanom
0
659
Member Avatar for ferdousKhanom

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 …

0
114
Member Avatar for z00t

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 …

Member Avatar for jon.kiparsky
0
161
Member Avatar for samppb

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 …

Member Avatar for Ezzaral
0
125
Member Avatar for dawnoflife

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 …

Member Avatar for jon.kiparsky
0
187
Member Avatar for souma123

Hi all, Please i need to know how to install fxtrade in myeclipse . Thank you in advance

0
48

The End.