32,204 Topics
| |
I am trying to create an applet for people to enter information, and the program should return a certain stat. However, after the user inputs all of the necessary information, no data is returned but this error message is: Exception in thread "main" java.lang.NullPointerException at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:991) at java.lang.Double.parseDouble(Double.java:510) at Player.toDouble(Player.java:110) … | |
can anybody describe me about java speech api with an sample code, and also how to get the java speech package and how to use in netbeans software?????:( rely me as soon as possible | |
The monthly payment on a loan can be calculated using the following formula: amount * R monthly payment = -------------------- -N 1 - (1 + R ) where: amount is the amount of money borrowed R is the monthly rate of interest for the loan N is the number of … | |
This will not run, and I am pulling it straight from the how-to.... [code] public class add { public static void main(String[] args) { int sum = add(5, 2); System.out.println("Sum is " + sum); public static int add(int firstInt, int secondInt) { return firstInt + secondInt; } } } [/code] | |
hello every one..I'm IT student i do understand it's logic and algorithm but I'm having hard time in programming.. I do hve weak foundation in Programming..can i ask help from u for my assignment? Problem: Write a program that reads student scores, gets the best score, and then assigns grades … | |
public static boolean compare(int[] a,int n) { for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if((a[i]*a[j])%2==0) return false; else return true; } } } there's an error coming when I try to include this function in my prog. I think the place of return true is causing problem.When I write the return … | |
i am having some connectivvity issues i am using postgres 9.0 sql db i have installed a dns localhost using the postgres sql driver also i have the jdbc jar files in the lib dir of the tomcat my code is [CODE] <%@ page language="java" import="java.sql.*" %> <% Class.forName("org.postgresql.Driver"); Connection … | |
Hi, I have a problem about update table in a database. The situation is I have a table named member which store thousand rows of data records about thousand of member for a system. This member table has a field named MemberExpiryDate which used to store each member expired date. … | |
Hi, I am a newbie with js so I hope that someone can help me please. I want to make a table with resizable columns. The code here seems to almost do what I want. [URL="http://bz.var.ru/comp/web/resizable-tables.js"]http://bz.var.ru/comp/web/resizable-tables.js[/URL] I have commented out the two lines below so that the columns that are … | |
Hi I'm in my first Java class, towards the end and am struggling with some code dealing with arrays. I'm not looking for the answers but am spinning my wheels (as usual) and am stuck on a particular problem. I'll list the problem here and then explain where I am … | |
Hey all I am a month or two in coding in java and currently I am doing a java calculator gui project, my professor requires us to code the gui by hand, and I did so with a panel and gridbaglayout layout manager, anyways since this is a calculator I … | |
good day sir's/ma'am , please help on how to search an inputted elements to an array... for example... i added a name "JOSEPH" and Address "ILOCOS" and i got an option search in my code and i don't know how i will gonna it... please help me.. [CODE]import java.util.Scanner; import … | |
When I declare a class or an instance of the class, I get the error, error: redefinition of 'class player' then after, I get, error: previous definition of 'class player' by the way, I am using gc++. If you want to see the source, just ask. thanx, JT | |
I have a bit of a puzzle, My default buttons (for when they are only an image) have this "highlight" listener, when the mouse enters/exits it draws a border to give the user some feedback. Its worked fine untill now, where I have a "close" button that, when clicked, removes … | |
[CODE] File file = new File(args[0]);[/CODE] what this line of code actually mean? | |
I have 3 threads. 3 are going to do a different tasks , so different run() methods. How to overload run() method? | |
I got error :At the constructor MyStackThreads "class , interface or enum expected" [code]import java.util.*; import java.io.*; class MyStackThreads extends Thread { Stack thestack= new Stack(); String expression; String splitexpr[]; MyStackThreads[j] { public void run() { try { DataInputStream dis=new DataInputStream(System.in); expression=dis.readLine(); for(int i=0;i<expression.length();i++) { splitexpr=expression.split(expression); thestack.push(splitexpr[i]); } } catch(IOException … | |
Hello guys, anyone knows where can I get the "Spring in Action" book on PDF format? Thanks! | |
I want to configure apache with JBoss.., I download Apache 2.X version it starts properly.,And I configure mod_jk and all steps.but,localhost is not working.., | |
Hi. I'm working on an address book (JDK) which prompts the user to enter 1 if he wants to add an entry, 2 if he wants to search for a name, or 3 if he wants to quit. I'm done with the 'add entry' and exit parts but I couldn't … | |
In Dorothy Sayers' novel "Have His Carcass", Lord Peter Wimsey describes a cryptography technique that is simple for encoding and decoding, yet relatively hard to crack. Your job is to implement this technique. Here's how it works, in Sayers' (edited) words: You choose a key-word of six letters or more, … | |
Reversed number is a number written in Arabic numerals but the order of digits is reversed. The first digit becomes last and vice versa. For example, if the number is 1245, then it becomes 5421. Note that all the leading zeros are omitted. That means if the number ends with … | |
A number is "prime" if it has no divisors other than itself and1. For example, 23 is prime and 35 is not prime because 35 = 7 x 5. If the digits of a number are rearranged, then usually its primeness changes - for example, 32 is not prime but … | |
A common problem when processing incoming text is to isolate the words in the text. This is made more difficult by the punctuation; words have commas, "quote marks", (even brackets) next to them, or hyphens in the middle of the word. This punctuation doesn't count as letters when the words … | |
Anyone have code with this?... Write a program to find the chain associated with any given number. Start with the given positive integer. This is the first number in the chain. Sort the digits (of the base 10 number) into ascending order, and also in descending order. Subtract the ascending … | |
Hi, I was wondering how I can use this type of list: [url]http://palib-dev.com/manual[/url] On the left, there are expandable lists. How can I use them? Thanks. | |
Well, I first made a topic about JDK commands not inputting, but fixed it now. I usually do my work in class when it comes to textpad - java, but right now, working at home. Here's my problem - I can't get it to compile. It gives me an error … | |
Okay, I am so close to this one I can taste it. I am trying to get the average mileage between two different tanks of gas in this code. I have most of the code written out, but I know there is something missing, so here we go! [CODE]import java.util.Scanner; … | |
I'm trying to print the average of this: [CODE]public class Grades { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int [] work = {20, 90, 100, 50, 80, 70}; for (int workValues : work) System.out.printf(" %d", workValues); System.out.println(" "); getAverage(work); modifyElement(work[0]); … |
The End.