35,618 Topics

Member Avatar for
Member Avatar for swy

I'm trying to read in the following text file: Jim Nasium mgr Fitness & Leisure 45000 Lazy Susan mgr Home Furnishings 55000 Gene Theory mgr Fine Jewelry 10000 And I have the following code: public abstract class Employee { private String name; private double grossPay; private double netPay; private final …

Member Avatar for NormR1
0
226
Member Avatar for razakhan

Hello. I was writing a java code for class and I was unable to figure out how strings and sub-strings work. Can anyone provide some insight on the program. Here is the problem: Given a bit string expression, such as 10110 OR 11101, evaluate it. Input: Each string represents a …

Member Avatar for NormR1
0
333
Member Avatar for jackbauer24

I know this is a pretty silly question, but what is exactly an object instance variable? To explain what I mean, take two classes:- [CODE=Java]public class Duck { boolean hasAtail; double height; public void go() { System.out.println(hasAtail + " " + height); } } public class DuckTestDrive { public static …

Member Avatar for DavidKroukamp
0
230
Member Avatar for 47pirates

i have a username and password login box when i send data to the socket its fine but when i print the same data from socket then extra bit is added a head of username. why is it so...please suggest

Member Avatar for JamesCherrill
0
104
Member Avatar for shadab550

sir i a student of 4th year i need some help in my project i m creating a online quiz 30 question and each question have 6 options which are check boxes and question have more then 1 ans so ,i ll select more then one check box so that …

Member Avatar for shadab550
0
251
Member Avatar for rushikesh jadha
Member Avatar for peter_budo
0
112
Member Avatar for rushikesh jadha

when i run my code using IDE it run fine but when i run it using command prompt it show following errors Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Administrator>cd\ C:\>cd bank2 C:\bank2>javac *.java CurrentTransaction.java:2: error: package com.mysql.jdbc does not exist import com.mysql.jdbc.Connection; ^ CurrentTransaction.java:3: …

Member Avatar for rushikesh jadha
0
264
Member Avatar for toferdagofer

import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TheatreRevenue extends JFrame { /** * */ final double percent = .20; double adultCost; private JTextField label2; private JTextField label4; private JTextField label6; private JTextField label8; private JButton button1; private final int WINDOW_WIDTH = 400; private final int WINDOW_HEIGHT = 200; /** …

Member Avatar for DavidKroukamp
0
1K
Member Avatar for harinath_2007

Hi , I have speech synthesizer java program. It is running fine when i run it from netbeans. But when i build the project and run the jar file , it's not working. The entire program is running fine in the jar file (i.e displaying window , doing stuff etc) …

Member Avatar for DavidKroukamp
0
784
Member Avatar for roshan_iiita

While running basic HelloWorld program using JSAPI, it is showing error "java.lang.NullPointerException at HelloWorld.main(HelloWorld.java:11)" Following is the code: [CODE]import javax.speech.*; import javax.speech.synthesis.*; import java.util.Locale; public class HelloWorld { public static void main(String args[]) { try { // Create a synthesizer for English Synthesizer synth = Central.createSynthesizer(new SynthesizerModeDesc(Locale.ENGLISH)); // Get it …

0
139
Member Avatar for rushikesh jadha

please tell me step of converting java source code into jar in netbean or if any software available please send me download link of it.

Member Avatar for rushikesh jadha
0
312
Member Avatar for Vampiricx3

Hey guys, right now I'm trying to setup my GUI so that I can search for an Employee (which when clicked, disables all of the Text Fields, but not the ID, so I can search for the ID. But right now I have no idea on how to do this, …

Member Avatar for zeroliken
0
177
Member Avatar for beetlejuice

hi, Recently i was trying to look for a pixel searcher for java that was built in with the language but the only command that was somewhat related to specific color pixel searching was the getPixelColor in the robot library. The problem with this command was that it only returned …

Member Avatar for NormR1
0
182
Member Avatar for dennysimon

hello all how to read from a text file which is not only run at the developer machine but also run at the other machine (after jar ing) I have tried ,the code run at my own machine but cannot find the text file on other machine thank you denny

Member Avatar for dennysimon
0
336
Member Avatar for Goldfinch

I was writing this simple loop and it's giving me trouble. It's supposed to count through the permutations in a deck, so Suit is supposed to go as high as Suit: 3 and Rank is supposed to go as high as Rank: 12, but it isn't doing that. My program …

Member Avatar for Goldfinch
0
180
Member Avatar for rushikesh jadha

how to store MySQL table data into file and then again from file to table using java program.

Member Avatar for rushikesh jadha
0
156
Member Avatar for DevNet

Hi guys. I just having a little problem about creating a good console GUI for our homework. My program is just a simple shopping cart program where in we were asked to create a GUI that asks for the user if he is either a ADMIN user or a CLERK …

Member Avatar for rushikesh jadha
0
169
Member Avatar for vartikachandra

i have to store msgs of string type in a file in java.how do i distinguish between 2 msgs.and how shud i delete the first msg in the file. for eg: "My name is abc.I am fbvnfdl.I am a girl." is stored in a file. and "My name is abc.I …

Member Avatar for stultuske
0
207
Member Avatar for 3nrichedd

Working on this program that uses 2 classes and a client program to test them, I keep getting this error pointing at my constructor, not sure what i am doing wrong but could use some assistance if anyone is able to offer, the error i am getting is: cannot find …

Member Avatar for stultuske
0
208
Member Avatar for mallikaalokam

package class import java.io.*; import java.lang.*; import java.util.*; package Yo public class C { String s,f,d; C(String s,String f,String d) { this.f=f; this.s=s; this.d=d; } void displayj() { System.out.println("1st arg passed:"+" "+s); System.out.println("2nd arg passed:"+" "+f); System.out.println("single arg const:"+" "+d); } } main class import java.lang.*; import java.io.*; import java.util.*; …

Member Avatar for rushikesh jadha
0
196
Member Avatar for emidevil

Hi. im kinda new here . i just want some help with this code i cant seem to figure out my problem, i already declared a constructor but it keeps on saying cannot find symbol when i compile it -_- import javax.swing.JOptionPane; import java.io.*; public class Sample_Thread { public static …

Member Avatar for DavidKroukamp
0
574
Member Avatar for sonicx2218

I like coding, though I'm really stupid, and not very good at it. I'm having trouble figuring out how to remove spaces from a String. I'm such a noobie.. if anyone wants to take a few min to educate me i'd appreciate it. The thing i was attempting to do …

Member Avatar for stultuske
0
118
Member Avatar for scheppy

I'm having some trouble using getClientproperty() to get a string value btw, im using java 1.4.2, so no autoboxing I know how to get int values, and here is an example, which works perfect in my program, [CODE] cx = ((Integer) btn.getClientProperty ("cx")).intValue (); [/CODE] but when i try to …

Member Avatar for JamesCherrill
0
257
Member Avatar for bsridharg

have to display an image(available on the server as a resource) in the webpage using jstl. In the code, I have the image url, but before displaying it in the page, I need to validate if the image is available on the server to display. I tried to use <c:import> …

0
39
Member Avatar for debasishdeb

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package progressbar; /** * * @author DEBASISH */ import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.awt.event.ActionEvent; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; public class Progressbar { JProgressBar jprogressbar=new JProgressBar(); JButton jbutton=new JButton("Retrieve information"); …

Member Avatar for zeroliken
0
132
Member Avatar for bhallarahul

[CODE]<jsp:usebean id="a" beanName="xyz">[/CODE] how to use above syntax in jsp to deserialize data while jsp page running on tomcat

0
43
Member Avatar for sharathg.satya

Is exception handling useful in compile time errors logical errors and even runtime errors?

Member Avatar for dewitt-joyce
0
289
Member Avatar for jamie6441

Hello, I'm a beginner at Java and trying to get to know programming and one day work my way up developing android apps. Well I was trying make this program that would read in data from a txt file like this: [img]http://i42.tinypic.com/2vvkokj.png[/img] I wanted the firstname, lastname, id# and dob …

Member Avatar for stultuske
0
285
Member Avatar for MichaelCJ10

I need help!!! im trying to get my sentinal to stop counting as my last value passed. Im imputting a value for a house,and its calculating a total price based on interest and stuff ive set up according to the house value. then pressing -1 to go onto the next …

Member Avatar for DavidKroukamp
0
263
Member Avatar for Goldfinch

Hi I'm trying to create an array of objects and then put a different value into each object. Problem is, I don't know why this isn't working. [CODE=java] public class TestProg2{ public static void main(String args[]){ Rank rank= new Rank(); } } class Rank{ private static int rankIndex=0; public Rank(int …

Member Avatar for Ezzaral
0
171

The End.