32,204 Topics

Member Avatar for
Member Avatar for lilk132z

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

0
51
Member Avatar for pradeesh.login

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

Member Avatar for peter_budo
0
35
Member Avatar for patrickgormally

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 …

Member Avatar for Akill10
0
189
Member Avatar for kodera

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]

Member Avatar for Akill10
0
73
Member Avatar for angskie20

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 …

Member Avatar for stultuske
0
343
Member Avatar for ajayb

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 …

Member Avatar for ajayb
0
124
Member Avatar for ankurmawanda

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 …

Member Avatar for masijade
0
287
Member Avatar for Kate Teoh

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

Member Avatar for Kate Teoh
0
123
Member Avatar for surrey_sailor

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 …

0
33
Member Avatar for curbster

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 …

Member Avatar for Akill10
0
12K
Member Avatar for ticktock

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 …

Member Avatar for ticktock
0
667
Member Avatar for jsefraijeen

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 …

Member Avatar for jsefraijeen
0
132
Member Avatar for jackmaverick1

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

Member Avatar for Fbody
0
8K
Member Avatar for hanvyj

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 …

0
47
Member Avatar for stephy1
Member Avatar for stephy1
0
372
Member Avatar for stephy1

I have 3 threads. 3 are going to do a different tasks , so different run() methods. How to overload run() method?

Member Avatar for stephy1
0
88
Member Avatar for stephy1

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 …

Member Avatar for stephy1
0
380
Member Avatar for erickvla

Hello guys, anyone knows where can I get the "Spring in Action" book on PDF format? Thanks!

Member Avatar for peter_budo
0
115
Member Avatar for vigneswaranm

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..,

Member Avatar for peter_budo
0
61
Member Avatar for astrojunk

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 …

0
71
Member Avatar for jecris

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

Member Avatar for masijade
0
92
Member Avatar for jecris

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 …

Member Avatar for masijade
0
123
Member Avatar for jecris

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 …

Member Avatar for masijade
0
110
Member Avatar for jecris

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 …

Member Avatar for masijade
0
141
Member Avatar for jecris

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 …

Member Avatar for masijade
0
449
Member Avatar for lisaroy1
Member Avatar for mangopearapples

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.

Member Avatar for mangopearapples
0
143
Member Avatar for kay19

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 …

Member Avatar for kay19
0
508
Member Avatar for Davitch

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

Member Avatar for adarshcu
0
115
Member Avatar for Transcendent

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

Member Avatar for Transcendent
0
138

The End.