32,199 Topics
| |
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 | |
Hey guys, I need some help with this coding. I feel like it's something simple so hopefully someone can figure it out. I know for certain that it has to do with float-int conversion problems, and I feel like once I figure that out the rest should fall into place. … | |
Hi everyone, I'm new to Java and i have a simple question but i don't understand it, can someone help me pls? In this exercise, we will use the String class to manipulate string variables. Write a program that reads in two String variables from the user and store in … | |
a) Output the date in multiple formats, such as i) MM/DD/YYYY ii) February 25, 2011 iii) DDD YYYY I'm supposed to do this: b) Use overloaded constructors to create Date3 objects initialized with dates of the formats in part (a). In the first case, the constructor should receive three integer … | |
I have created 2 menus using JForms. I have two buttons in the 1st menu (menu1.java) I want to go to the second menu (GUI of menu2.java) whenever I press button 1 in menu1.java. How can I do that. What should I write in the actionListener func for button1? | |
Create a class called Student. This class should have the following twelve private data elements: String studentName String studentEmail String studentLocation int projectGrade1 int projectGrade2 int projectGrade3 int projectGrade4 int quizGrade1 int quizGrade2 int finalExam int participationGrades This class should have the following public methods: A get method for each … |
The End.