32,204 Topics
| |
I have a pretty good understanding of what JAX-RS or any web-service is, but i have to question why use it? I have learned to use J2EE implementing a web application (JSP, JavaScript, CSS) that uses Service Classes to interface with EJB's, which then those EJB's interface with an EIS … | |
I've tried to change to yellow, then pause for 4 seconds before changing to green but it doesn't work. public TrafficLight() { // Construct the circles red = new Circle(); yellow = new Circle(); green = new Circle(); // Set their color and make them visible red.changeColor("red"); red.makeVisible(); red.moveHorizontal(200); red.moveVertical(200); … | |
My Text file is below. The bounds should be 0-2 for letter A or D then 2-15 for StateName(these are new states being added to a stack) and 15-25 for what should be the capital, but not all of them have capitals and for those I am getting an out … | |
Assume that the variables a, b, c and d are signed integers held in registers $s0 to $s3 respectively and put the result of the expression into register $t0. Also assume that the result of the multiplication will fit in 32 bits. (a + 2) * (b + c) * … | |
Hey there, Just hit a road block in my assignment. I won't concern you too much with the assignment itself but it's basically a number input operated menu with option's like "Display employee details" & "Input pay details." I'm up to a part where I need to get the section … | |
Basically I need to write an application to calculate BMI using the formula; BMI = w/ (h/100) 2 The user must type in her height in centimeters and weight in kilograms, and the computer prints out the user's BMI. import java.util.Scanner; import java.text.DecimalFormat; public class BMI { public static void … | |
Can someone point me in the right direction? I have a java program created in netbeans that has several tabs that contains various text fields, boxes and such. Over top of these I have a jlable that displays a jpg, or other graphic file that is used for a background … | |
Hi, I am trying to make my own paint program. It uses canvas where user draws. How can I get image representation out of that canvas as bufferedimage so I can save it with imageio.write? | |
I have a class project where we must create a program that takes 5 grades of a student that the user inputs and stores them into an array and then gets the average of the 5 grades for example Grades = 92 89 99 78 96 And then stores those … | |
For my class we need to create an Ascii drawing with at least 3 nested loops and 3 different type of loops. this is what i have so far ( just 2 lines of the drawing) for(int i = 0; i<=4; i++) { System.out.print("0"); } for(int i = 0; i<=13; … | |
I’m not sure why this isn’t working. Java isn’t giving me an error I have this in my StateController class public void insertLinks() { for(int index=0; //index is a local variable for state objects index < numStates; index++) //for loop to continue making state objects stopping at numStates(50) { myList.insertFirst(myStates[index]); … | |
Hi, i am not sure whether this topic would go under this category, thought this would be more suitable what are the famous software architectures? i have to do an research on this an present, I am new to this topic appreciate a reply thanks | |
Hi, I'm concentrating on getting my card and deck classes for a card game project working correctly. Both my card and deck classes are working technically correct but when I go though my nested for loop in my Deck class to create a deck of cards it ends up being … | |
Hi, I have to write a program that plays out a whole game of the card game WAR. I have to create a bunch of classes that go along with some pre written classes so right now im trying to start out small and work my way up. We are … | |
package vc_client1; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.Socket; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; public class voiceReceiver { public Thread playThread; boolean stopCapture = false; static ByteArrayOutputStream byteArrayOutputStream; AudioFormat audioFormat; static TargetDataLine targetDataLine; AudioInputStream audioInputStream; BufferedOutputStream out = … | |
What is the way that need to be implemented in java to make a server broadcasts a voice to multiple clients, instead of broadcast voice only to one client? for example I am doing a server which can broadcast voice to multiple clients at the same time, now my server … | |
Gents as you can see I have done great progress in getting the last line and the line beforelast working and spliting but I am stuck now as I need to the beforethat (3rd) line from last also included and I can't figure it out, everything i do fails to … | |
Hi, can anybody help me with this? I am doing an Introduction to Programming module using Java and am stuck at this question. Write a program which reads in a username and a password, and expects the username to be "brian" and the password to be "spam". The program should … | |
help i cant figure it out. Write a program that defines and instantiates a new String object called title with COMPUTER PROGRAMMING in it. Then create a new String labeled title2 -- write code to store the contents of title into title1 in reverse order. Using a for loop and … | |
Hi, I am doing a project on creating a traffic simulator for a particular road junction in java. I am looking for ideas on how I would go about recreating the visual of the junction in which I can have moving cars on. Would I use Graph with nodes or … | |
so I have a 2D arry with defaul value 0, and what I want to do is to accept a value from a user to change 0s to 1s depending on the accepted value. for example: we have an arry like this 0000 0000 0000 0000 and the user enters … | |
Recently I learnt java as a crash course in a private institue they covered me core and advanced core concepts in java for the version 1.6. Since the lastest version is java 1.7, so which book I should follow for my further improvements to become an ideal Java programmer. | |
hi i need to convert my comma seperated text file in to a two dimensional array and i should be able to access each element in that array....i tried so many programs based on read line and split functions but i didn't get the proper output....please help me to do … | |
Hi, all. I've got task about Natural Language Processing. Usually called NLP, is a technique to process natural language/people word became information for some needs. That's I learn about so far. I wonder if somebody can help me in NLP using Java programming language. If there some references or books … | |
class Account { Long accNum, pwd} public class Banker { public static void main(String r[]) { new Banker().go(); // do more stuff } void go() { Account a1 = new Account(); a1.accNum = new Long("1024"); Account a2 = a1; Account a3 = a2; a3.pwd = a1.accNum.longValue(); a2.pwd = 4455L; } … | |
<? super Animal> means animal or it's superclass only. Then why inside the method it's allowing to add Dog object even though it's a subclass of Animal? This program compiles and runs! import java.util.*; class Cat {} class Animal{Animal() {System.out.println("Animal constructor");}} class Dog extends Animal{Dog() {System.out.println("Dog constructor");}} public class GenericDemo5 … | |
So i am seriously in need of help from someone or everyone on improving my program and any corrections if needed. I have listed my codes below and i am hoping to receive input, suggestions, corrections, and advice. Please remember, i am new to programming so please for those of … | |
Can anyone tell me how to use Java Keylistener to add validations in my java gui form?? eg. I have a textfield. I want to enter only alphabets in it. I dont want any numerics. So when a user tries to type a numeric value in it, I want to … | |
this is Sudoku.java this is the main class. Reminder does the time keeping, the SudokuBoardDisplay displays the board and draws images. The one who handles the logic is the SudokuModel How do I make the images clickable and do something. how to display the remaining time as JLabel ....? i … | |
am i able to delete the text from output window? please answer me.. |
The End.