| |
thread by: imtiazalikhan |
last post Jun 17 '10 by: sandeeptri
hi i am trying to sum 10 numbers passing them by command line line argument
but the problem is it only work with 1 and if i passing other numbers then again it will show the result of number1:
code:
class arguments
{
public static void main(String args)
{
int sum=0;
int avg=sum/10;
|
thread by: alexlunar |
last post Mar 23 '12 by: kabo otsetswe
Hello, I am trying to figure out when I have done wrong or what i have not included in my most recent edit of my payroll code.
My code from last week was
// Week 2 payroll
// payroll program that calculates weekly pay
// sentinel-controlled repetition
import java.util.Scanner; // program uses class Scanner
public class payroll
|
thread by: MauBady |
last post Mar 28 '07 by: sicarie
Hello,
I'm new in java. my actual problem is :
how can i test if a resultset is empty?
I have tested:
rs == null
rs.next()
rs.isAfterLast()
rs.last()
|
thread by: Murat Tasan |
last post Jul 17 '05 by: Murat Tasan
i have an inner class and an outer class, both of which have an
identically named member. how from the inner class can i reference the
outer member? (the example code should illustrate this problem).
class Outer
{
int x;
class Inner
{
int x;
|
thread by: HaifaCarina |
last post Feb 29 '08 by: sukatoa
here's the complete lines of errors..
Exception in thread "main" java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
at CsvTest.readFile(CsvTest.java:26)
at Trial.main(Trial.java:24)
I have no idea what to change here because I don't know what is wrong..please help me out...
...
|
thread by: kaleeswaran |
last post Jul 24 '08 by: r035198x
hi!
i tried to get the input through keyboard using keyboard.readInt() method
but after compilation error shows "variable keyboard undefined"
i don't know how to solve the pbm..plzz tell me...and this is my pgm:
import java.io.*;
import keyboard.*;
public class test
{
public static void main(String args)
|
thread by: deepakguddu |
last post Oct 13 '07 by: JosAH
What is the use of printStackTrace() function in java programming ?
|
| |
thread by: bvmpriya |
last post Aug 4 '09 by: nicemothi
What is the difference between JDK 1.4 and JDK 1.5? What special function does JDK 1.5 have?
Thanks in advance.
|
thread by: wassssup |
last post Apr 11 '08 by: BigDaddyLH
i know math.random can randomly generate numbers, but i want to know is there a way to let the system decides which variable to choose from a and b?
i want to set both can randomly be selected (50 - 50) chance?
|
thread by: jrodri1080 |
last post Feb 20 '07 by: r035198x
I have a script that i need help with from school, i have an arraylist and i need to switch that for a HashMap. I would appreciate if anyone can help. THANKS
import java.util.*;
/**
*
*/
public class Bank
|
thread by: monkey1001 |
last post Feb 7 '08 by: r035198x
my program is suppose to show my due change and i got it working but my change and coins are wrong how can i improve it thank you..(its supposed to be in java)
|
thread by: aquafina |
last post Sep 14 '23 by: Elenamay
Hello,
I am writing a client/server application for live video streaming. Could anyone please suggest me a library or framework that eases the work?
Thank you,
|
thread by: Muzzy |
last post Jul 17 '05 by: Berlin Brown
Hello,
I just have a problem with following: i have a .jsp file containing a static
html menu and a table cell where i need to include a servlet call result.
Servlet is called with the same parameters as the .jsp file.
<table>
<tr>
<td>
<!-- Here i need to include a call to the servlet with
|
thread by: AceKnocks |
last post Jan 8 '08 by: BigDaddyLH
I have been given this interface,
interface BinarySearchTree {
public void insert(Integer data);
public int size();
public int height();
public boolean contains(Integer target);
}
|
thread by: Ante |
last post Jul 17 '05 by: Ante
Hello Group.
How can I create an array of Hashtables?
I simply tried with
Hashtable ht = new Hashtable;
but when I put something into that array I get an nullpointer
exception.
ht.put("Name1", "Value1");
|
| |
thread by: YesBalala |
last post Jul 17 '05 by: YesBalala
Since I've upgraded my Java to 1.4.2_02, I've noted that it will crate
a subdirectory named hsperfdata_SYSTEM under windows/temp and some
Perflib_Perfdata_xxx files as well. The problem with these files is
that I cannot delete them (it's not own by me ...the administrator!).
I have a temporary file clean up utilites which tried to clean up...
|
thread by: Danny Gopie |
last post Jul 17 '05 by: Janwillem Borleffs
Hello
public class e29 {
public static void main(String args) {
String waarde = JOptionPane.showInputDialog(null,"Voer een getal
in","invoer getal",JOptionPane.QUESTION_MESSAGE);
int aantal = Integer.parseInt(waarde);
for ( int i = 0; i < 10; i++) {
|
thread by: audiokarate |
last post Oct 10 '07 by: JosAH
I have like atleast 15 errors that say class, interface, or enum expected and I have no idea what that means. Can someone tell me what it is and how I might be able to fix it?
Thank you.
- Manny
*Program Purpose: This program processes the results for the 2008 Democratic and/or Republican presidential
primary elections.
|
thread by: Schneider Alexander |
last post Jul 17 '05 by: deadsea
Hello,
I would to encode and respectively to decode string's. Now ist my question:
Is there a Funktion into J2SE 1.4 API?
Thanks
Alexander Schneider
|
thread by: jeffbroodwar |
last post Nov 21 '11 by: Aeren
Hi everyone,
I have a program that converts variables long,string,double to byte array here's the code :
for long :
//CompanyId
temp = longToByteArray(CompanyId);
for (i=0,i2=7; i<5; i++,i2--)
|
thread by: swethak |
last post Jun 15 '09 by: farahshafilla
Hi,
My Requirement is to upload the images into database through jsp. For that i write a code .And it works fine .But in that File imgfile = new File("C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/test/Blue.jpg"); instead of that i used File imgfile = new File("Blue.jpg"); like that it didn't work. When we browse that...
|
thread by: lolv007 |
last post Mar 20 '12 by: Jynovas
I am a complete rookie at programming, and I've installed NotePad++ on my laptop so I can practise writing scripts outside of uni. I've also installed JDK v 1.6.0 (Java Development Kit), JRE and JDK Documentation onto my laptop.
My problem is that when I try to compile my program in NotePad++ (before I run the application), I get an error...
|
thread by: Eric West |
last post Jul 17 '05 by: Silvio Bierman
Greetings-
I have a web application that has a form that triggers a server process that
I would like to provide a "Searching..." page for.
My strategy was to send the browser the "top half" of a web page, including
an animated "Searching..." gif. I write the contents of this page to the
HttpServletResponse output, and then flush the...
|
| |
thread by: Coreyja |
last post Dec 1 '08 by: Coreyja
Im trying to display a png image by setting it as a ImageIcon and then putting that in a JLabel. I cant get it to display the image. I am using a null layout as it is the simplest way for me to get everything displayed how I want it to be. Here are the snippets of my code that I think are the important parts. Let me know if there is anything else...
|
thread by: Jorge Cecílio |
last post Jul 17 '05 by: Ryan Stewart
Hi all!
I've a (beginner) problem accessing a method on another class.
When I execute a method such as:
//response to a swing button
public void actionPerformed(ActionEvent event) {
|