35,618 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
| |
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: … | |
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; /** … | |
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) … | |
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 … | |
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. | |
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, … | |
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 … | |
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 | |
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 … | |
how to store MySQL table data into file and then again from file to table using java program. | |
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 … | |
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 … | |
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 … | |
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.*; … | |
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 … | |
![]() | 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 … |
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 … | |
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> … | |
/* * 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"); … | |
[CODE]<jsp:usebean id="a" beanName="xyz">[/CODE] how to use above syntax in jsp to deserialize data while jsp page running on tomcat | |
Is exception handling useful in compile time errors logical errors and even runtime errors? | |
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 … | |
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 … | |
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 … |
The End.