32,199 Topics

Member Avatar for
Member Avatar for raider650

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for mikewyatt

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 …

Member Avatar for mKorbel
0
81
Member Avatar for Viped

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?

Member Avatar for JamesCherrill
0
415
Member Avatar for Mas49er

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 …

Member Avatar for richieking
0
236
Member Avatar for Seswing142

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

Member Avatar for Seswing142
0
288
Member Avatar for taylor.mitchell.353

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

Member Avatar for dimasalang
0
368
Member Avatar for anisha.silva

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

Member Avatar for <M/>
0
198
Member Avatar for Yoink

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 …

Member Avatar for Yoink
0
276
Member Avatar for Yoink

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 …

Member Avatar for Yoink
0
686
Member Avatar for khalidshakar

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

Member Avatar for khalidshakar
0
304
Member Avatar for khalidshakar

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 …

Member Avatar for khalidshakar
0
516
Member Avatar for gcclinux

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 …

Member Avatar for Taywin
0
263
Member Avatar for Julie29

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 …

Member Avatar for JamesCherrill
0
7K
Member Avatar for applepie-0167

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 …

Member Avatar for Taywin
-1
111
Member Avatar for slimergan

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for OsaidAz

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 …

Member Avatar for OsaidAz
0
142
Member Avatar for randmateweb

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.

Member Avatar for JamesCherrill
0
138
Member Avatar for abinaya.lingam

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 …

Member Avatar for JamesCherrill
0
354
Member Avatar for if10066

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 …

Member Avatar for Lucaci Andrew
0
167
Member Avatar for rahul.ch

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; } …

Member Avatar for rahul.ch
0
233
Member Avatar for rahul.ch

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

Member Avatar for rahul.ch
0
335
Member Avatar for NewGuy2Prog

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 …

Member Avatar for JamesCherrill
0
172
Member Avatar for Darshan5

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 …

Member Avatar for JamesCherrill
0
185
Member Avatar for ownedbynothing

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 …

Member Avatar for mKorbel
0
589
Member Avatar for akosivivas
Member Avatar for dimasalang
0
94
Member Avatar for liphoso

is it possible to have my cellphone send periodic text to another phone stating the location (GPS)? concider: Assume i have lost my phone and would obviously like to have it back. is it possible to design an application that will periodically (automatically say after 60 mins passes) send a …

Member Avatar for dmanw100
0
115
Member Avatar for Murphyv10

Howdy guys need help changing , from string to a big decimal for my addition method in my calculator , i understand the problem but not the solution . Any help would be great, thanks. public void add() { BigDecimal oneNumber = model.getDisplay(); BigDecimal twoNumber = model.getDisplay(); BigDecimal result = …

Member Avatar for NormR1
0
195
Member Avatar for utchia

Hi i am trying to write a search function and the question i have is this, when i do something like this comix[0] = new Comic("book title", "Author", "isbn", 454.24F); for (int i = 0; i < comix.length; i++) { Scanner console = new Scanner(System.in Scanner console = new Scanner(System.in); …

Member Avatar for Taywin
0
214
Member Avatar for Rami Sohail

hello everyone need help with my program this is a airplane seating program for reservations it's a 2d array of 000 .. and when i take a seat it changs to 1 we have first class supposed to be first 2 rows and rows 3 to 7 are business class, …

Member Avatar for Taywin
0
4K
Member Avatar for gorgoro

I want to start as junior in Java in a company but they ask me to present them some tasks that ensures that i am more than a junior.they offer me a task to create a Swing Gui with buttons and stuff.I have already a good knowledge of Java from …

Member Avatar for gorgoro
0
266

The End.