32,199 Topics

Member Avatar for
Member Avatar for ace22

Hello, I'm working on a little project. I need to have program which: [B]1.[/B] reads textline from user (example: A little cat goes to town) [B]2.[/B] a) reads words what user wants to change to 0 (example word cat to 000) b) one word to one line and if given …

Member Avatar for ace22
0
89
Member Avatar for yumyam09

help how to make payroll using java program and the following conditions: 1.one dimensional array 2.two dimensional array 3. accept inputs of string, integer and double data types 4. validation using if-else-if 5. use of loops constructs 6. computation 7. summary 8. use of JOptionpane/system.out.print pleas help me

Member Avatar for Roodra
0
591
Member Avatar for jorelastig

I should create a Java program called FindThatNumber.java. The program should generate 10 random integers between 1 and 100 (inclusive) using Math.pow( ) and then store them sequentially in an array. The program should then ask the user to enter a single integer. If the integer is in the array …

Member Avatar for jwenting
0
103
Member Avatar for wardduncan

I need some help with understanding an error that I am getting. Can anyone help me. Here is my problem. I am trying to hardcode information for a mortgage calc and I am getting an illegal start of expression error. Here is an example: MortgageLoanCalculator.java:15: illegal start of expression double …

Member Avatar for masijade
0
148
Member Avatar for simplyflawless

Write a method that computes future investment value at a given interest rate for a specified number of years. Use the following method header: public static double futureInvestmentValue(double investmentAmount, double monthlyInterestRate, int years) For example, futureInvestmentValue(10000, 0.05/12,5) returns 12833.590. Write a test program that prompts the user to enter the …

Member Avatar for javaAddict
0
429
Member Avatar for darek9576

String class provides us with the method String.valueOf(some stuff) that basically converts "some stuff" into a string.. But we can also concatenate "some stuff" with an empty String (""). Both these methods result in a String representation of an object(or other data type) so my question is what is the …

Member Avatar for javaAddict
0
146
Member Avatar for funjoke88

The application will ask questions like: What comes after D? A child is expected to answer the question and the application will inform the child if the answer is correct or wrong. The application will ask a total of 20 questions. After all 20 questions have been answered, the application …

Member Avatar for jwenting
0
117
Member Avatar for phoenix911

I have no idea whats wrong here, i am fairly new to java.. heres my code.... [CODE] private JPanel pnlLogin, pnlFinalLogin,pnlUser, pnlPass = new JPanel(new BorderLayout()); btnLogin = new JButton("Login"); lblUser = new JLabel("Username:"); lblPass = new JLabel("Password:"); pnlUser.add(lblUser, BorderLayout.WEST); //pnlUser.add(txtUser); pnlPass.add(lblPass, BorderLayout.WEST); //pnlPass.add(txtPass); pnlLogin.add(pnlUser, BorderLayout.WEST); pnlLogin.add(pnlPass, BorderLayout.CENTER); pnlLogin.add(btnLogin, BorderLayout.EAST); …

Member Avatar for phoenix911
0
107
Member Avatar for adity

I have an eclipse application from which i trigger an Swing widget.On click of a button on the SWT composite a window pops out which contains the Swing Table. Now i want a button on this Swing page to show up an eclipse workbench window. Any idea on how I …

Member Avatar for BestJewSinceJC
0
339
Member Avatar for aereall

When I try to run my WordSort class with another class using the code: WordSort ws = new WordSort(sentence); ws.sort(); The program prints out what I want it to in the first method but for the ws.sort() method, the program prints out null. I would like it to print out …

Member Avatar for BestJewSinceJC
0
97
Member Avatar for esy928

I'm making a game as my project in school. I'm having a problem regarding double buffering, im trying to draw an image (drawImage(,,,,)) into the double buffered image, I can't seem to make it work help please =D [CODE] public void render() { if(doubleBufferImage==null){ doubleBufferImage = createImage(PANEL_WIDTH,PANEL_HEIGHT); // Set Size …

Member Avatar for esy928
0
125
Member Avatar for doha786

hi, here is my code having return method that working correctly when i print it from inside of the method, but if i call from main method its shows only one output instead all results.. [CODE]public class SearchCompare{ .... public String process(){ String showResult=null; ... .. for (String found: names.keySet()) …

Member Avatar for doha786
0
115
Member Avatar for nyny11211

please tell me where i'm off the window opens but no menu bar. the error says : java:52: '.class' expected menuInput[][] = array [row][col]; thanks hs [CODE] import java.awt.*; import java.awt.event.KeyEvent; import javax.swing.*; public class Driver{ public static void main(String[] args) { TheWindowObject aTestFrame = new TheWindowObject ("test"); } } …

Member Avatar for nyny11211
0
78
Member Avatar for simplyflawless

hey guys, i have to do this program and i'm having trouble: Write a program that lets the user enter the loan amount and loan period in number of years and displays the monthly and total payments for each interest rate starting from 5% to 8%, with an increment of …

Member Avatar for simplyflawless
0
106
Member Avatar for FotG2
Member Avatar for BuhRock

I just wrote my first program using methods (I am only on chapter 5). I am not sure where I would use javadocs other than the ones that I already have in my code. Can someone help me? [code]/** * @author Brock Shelton * Date: March 15, 2010 * purpose: …

Member Avatar for BestJewSinceJC
0
156
Member Avatar for HelloMe

Hello everyone :) My problem is that my input will not be transfered when i build a new Object. To understand my problem i give you first the output: Welcome Hero! Show me your Attributes! Enter your Name: KIKI Enter your Strength: 50 Enter your Health: 60 Enter your Intelligence: …

Member Avatar for BestJewSinceJC
0
118
Member Avatar for Ciarant

import java.awt.*; import java.awt.event.*; import java.io.*; public class StudentWriteApp extends Frame implements ActionListener { //Declare stream objects FileOutputStream outputStudent; //Stream to create file ObjectOutputStream objSaveStudent; //Stream to save an object //Declare components TextField txtStudentName = new TextField(20); TextField txtAddress = new TextField(20); TextField txtResults = new TextField(25); Button btnSave = …

Member Avatar for Ciarant
0
194
Member Avatar for memo1

Hi , I'm a new learner of Java I start study Java since 2 weeks one of my friends challenge me to type program that show the number which I enter , It's even or odd . could you help me about the main things ,,,

Member Avatar for javaAddict
0
113
Member Avatar for stratsp

just needed to know when does getHeaderField(String) shows null. Is there any other case where null is returned even if the header exists

0
57
Member Avatar for astronomical

All, Basically what you have here is a PART of my program. Here I am supposed to get the LENGTH of a rectangle from a user and return that length to the main method for further use. My program works fine if I take out the input validation but I …

Member Avatar for javaAddict
0
130
Member Avatar for suave_sak
Member Avatar for masijade
0
77
Member Avatar for HelloMe

Oje me again... :$ Hello everyone... I have a superclass Human and a subclass Warrior. Problem is, human got this method: [code] public void Reveal() { System.out.println("I am " + name + ". "); System.out.println("My Strength is " + strength + " my Health is " + health); System.out.println("My Intelligence …

Member Avatar for HelloMe
0
115
Member Avatar for HelloMe

Hello everyone... For now i have build a Human class and i want to test it now but on 2 lines there is an error and both errors states "void expected". I have a main function in my class but later i gonna remove it because i want this Human …

Member Avatar for HelloMe
0
108
Member Avatar for xsimsyx

I am using netbeans 6.8 and the program is running in a applet. Hi,would you know the answer to this simple question.When a user is prompted from the text area to input their name in the textfield what would make the program display the next paragraph of text in the …

0
49
Member Avatar for askjake

Hi All, I am testing the web services I have deployed on my glassfish but upon clicking the "test" button, an exception occured. For reference, pls see exception below. javax.servlet.ServletException: javax.xml.ws.WebServiceException: {http://services.wet.webservice.ngin.smart.com/}AccountManagementService is not a valid service. Valid services are: {http://services.lawak.webservice.ngin.smart.com/}AccountManagementService at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:569) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:184) at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:119) at com.sun.enterprise.webservice.JAXWSServlet.doGet(JAXWSServlet.java:237) at …

0
85
Member Avatar for pateldeep454

Assignment: One way to calculate ex is to use the infinite series expansion ex = 1 + x + x2/2! + x3/3! + x4/4! + ... If the loop variable is named i, then the ith term is equal to xi/i!. a. Write a method called myexp that adds up …

Member Avatar for pateldeep454
0
517
Member Avatar for darek9576

Could anyone give some info on the printf() method.. I know we can put %d and %s in the format argument so that it takes a string data type and a decimal data type but apart from that are there any other uses of printf()? some simple examples will do …

Member Avatar for BestJewSinceJC
0
88
Member Avatar for new_divine

i'm want to make a voice recognition system using java but someone told me that voice recognition is hard using java is it so??if not which package is best to use for it in java ??

0
63
Member Avatar for javitis

Hello, i have a simple question. Let's say you have 3 private attributes. If you want to insert a value you use a set method and when you wish to display its content you use a get method. When you use a constructor with a parameter list e.g.: private String …

Member Avatar for javitis
0
61

The End.