32,199 Topics

Member Avatar for
Member Avatar for boris90

I need a user to input int and get the name of the month in return. I have this: [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package se211.dz14; import java.text.DateFormatSymbols; import java.util.Scanner; /** * * @author Boris */ …

Member Avatar for DavidKroukamp
0
1K
Member Avatar for riahc3

Hello I'm tring to declare a BinaryOut type of object in a Java web project but it doesn't seem to work. I've imported the same libraries I used in a standard Java project so I don't know what's wrong. Any tips????

Member Avatar for riahc3
0
182
Member Avatar for warlord902

I have a static class, with all methods and fields static. My methods in that class are going to use a static field declared in that class. I want that static variable(which can not be made final) to be initialized with a value taken from a database when that static …

Member Avatar for warlord902
0
215
Member Avatar for pseudorandom21

Is there a simple way to get a list/array of all the predefined colors? (without listing them all individually) ? It seems as though the colors are properties of the class "Color" rather than an enumeration.

Member Avatar for JamesCherrill
0
575
Member Avatar for warlord902

I have a kind of doubt, suppose I have a class like this: [CODE] public class AA{ public static createUser(String a, int b){ User usr=new User(a,b); BB.storeUser(usr); } } [/CODE] Now, if multiple threads call this createUser() method of this class at the same time, will it cause any kind …

Member Avatar for warlord902
0
188
Member Avatar for wallet123

HI im a student and our professor asked us to convert a number into word: example: input= "1" output="one" i need to have numbers from 1-10,001 so my program will end up very long if i only use if else statement i know that there are other methods other than …

Member Avatar for wallet123
0
699
Member Avatar for _neo_

Hi folk. Can I use join() method in implementation of run(), like this: [CODE] public class MyThread extends Thread { @Override public void run() { int timeout = 30000; // here is some heavy work join(timeout); } } [/CODE] Is above thread terminated after timeout milliseconds if task takes longer …

Member Avatar for _neo_
0
292
Member Avatar for Whilliam

I'm making a calculator program but I'm stuck somewhere. I'm still new to J2ME. So guys, please take it easy on me. :). I've been trying to find the error for 4 hours now. I think the problem is, x won't retain the value.. anyway, here's the full code. [code="java"] …

Member Avatar for NormR1
0
145
Member Avatar for dennysimon

Hi all when I run commend : "C:\LJava\project\KTest2>java -cp .;org.freixas.jcalendar;.\build components.KTest2" my code runs well I then made a jar file with the command "C:\LJava\project\KTest2>jar -cf KTest2.jar .\build\components\*.class" my MANIFEST.MF 's content is : Manifest-Version: 1.0 Created-By: 1.7.0 (Oracle Corporation) Main-Class: components.KTest2 but when I run command "C:\LJava\project\KTest2>java -jar KTest2.jar" …

Member Avatar for dennysimon
0
179
Member Avatar for mohamed moamen

I want to create a JFrame and add panel to it ,the problem in drawing line in this panel [ICODE] package panel; import java.awt.Graphics; import javax.swing.JFrame; import javax.swing.JPanel; public class Main { public static void main(String[] args) { JFrame window = new JFrame(); window.setSize(200, 200); window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Graphics g =null ; …

Member Avatar for mohamed moamen
0
1K
Member Avatar for avinash_545

Hi everyone. I am currently working on a small project, where I have to interface an ERP (OpenERP) with another system (SugarCRM). For that, I am going to make use of the middle-ware Mule ESB, and to retrieve the ERP data, I will make use of a Java EE 6 …

Member Avatar for avinash_545
0
171
Member Avatar for thanatos1

Hey guys, I'm making a little pokemon game in java and i've come across a problem. The basic algorithm i use for movement is as follows: - if the player has pressed a particular key set the speed(float) accordingly (if key stroke was up, X speed should drop (since i'm …

Member Avatar for JamesCherrill
0
184
Member Avatar for hsmroz

can any one help me wright the code for any simple java games, choose one from the selection below plsss (using jav -Base Conversions -Lotto 649 -Mastermind -Hangman -Deal or no -Deal -Who Wants to be a Millionaire -Card Games -Theatre Seating -Morse Code Instant/Fortune Teller -Pay Stubs -Educational Game …

Member Avatar for Ezzaral
-1
737
Member Avatar for AlexTrott

Hello, I'm hoping you guys can help. I have a double linked list, and i am trying to add a bubble sort to it,I am really new to java, I've been able to do a bubble sort with great easy whilst using binary trees, but now i'm using a double …

Member Avatar for JamesCherrill
0
378
Member Avatar for JavaPrograms

Alright, so basically I have this program going, it reads the text file perfectly, I also have some arrays created. Now I need it to store each team's rebounds, assists, and points separately. From there I need to get the mean, median, mode for each section (which will be completed …

Member Avatar for JamesCherrill
0
173
Member Avatar for boris90

Hi, this is my first post here, and I really need some help with my homework. I'm a newbie to Java programming, and I have this assignment: [I]Write an application which reads data from a file about certain items (one row - one item, stored are the integer valued code, …

Member Avatar for DavidKroukamp
0
276
Member Avatar for Majestics
Member Avatar for eng_mary

Hi everybody I'm trying to write such a code: [CODE] import pps.PPSFrame; public class X extends PPSFrame{ ..... } [/CODE] Of course there's no such pps package in java. Where can i find it ? or at least PPSFrame.class ? Regards,

Member Avatar for eng_mary
0
234
Member Avatar for CountryBumpkin

I am fairly new to java and I have a program that I really need to get working. I need to pass 'alarmId' from class A to class B. I am not too sure how to go about this, any help would be greatly appreciated. [CODE] public void onStart() { …

Member Avatar for Philippe.Lahaie
0
515
Member Avatar for rotten69

Hi all there, I was reading a book on Java and came across this piece of code. Now, I am not sure how line 13 works especially, these symbols after the equal signs "passed=%d; failed=%d%n" . How do the symbols affect the output of the variables(passed & failed)? so let's …

Member Avatar for JamesCherrill
0
322
Member Avatar for sha11e

I'm trying to make a cllient-server chat that only needs to be able to handle 1 connection. First, I have a data-type question: 1. At the moment I am using this code to get messages [CODE] BufferedReader ins = new BufferedReader(new InputStreamReader(sock.getInputStream()));[/CODE] And this code to send messages [CODE] PrintStream …

Member Avatar for babu15
0
196
Member Avatar for wallet123

So here it is, this is my new problem, we were assigned to create a simple ATM Machine: Automatic Teller Machine [B] Balance Machine [D] Deposit [W] Withdrawal [Q] Quit Select you option: (input letter here) when i choose balance this window should pop out: Your Balance is 0.00 OK …

Member Avatar for wallet123
0
203
Member Avatar for umair jameel

How print this series in while loop square root 1 2 4 8 16 32 64 128.......... and cube root 2 8 24 72........

Member Avatar for stultuske
1
1K
Member Avatar for Stein102

I'm trying to take a text file with 20x15 numbers(or characters, doesn't matter) into a 2d array. I just can't seem to get it to work. Can you help me fix it? Thanks [CODE]FileInputStream fis = new FileInputStream("MapFile.txt"); while (fis.available() > 0) { for (int x = 0; x < …

Member Avatar for dmanw100
0
133
Member Avatar for skylinepkr

Hello all, I am trying to make a program that essentially takes a string of parenthesis and outputs whether or not its balanced. Basically, every '(' will push the index of that location of the string on to the stack, while a ')' will pop it off if it's not …

Member Avatar for DJSAN10
0
175
Member Avatar for Blackiey

Interface: [CODE]import java.awt.Rectangle; public interface Doubler { public void makeDouble(Rectangle newRectangle); }[/CODE] [CODE]import java.awt.Rectangle; public class RectangleDoubler implements Doubler { private double x, y, width, height; RectangleDoubler() { x = 0.0; y = 0.0; width = 0.0; height = 0.0; }//end of default constructor public void makeDouble(Rectangle newRectangle) { x …

Member Avatar for thanatos1
0
254
Member Avatar for ilmkidunya

Hello friends is there any keylogger scripts thats I putt into my home page when user visit it it make a log file of users key storks and send it in the mail or upload in the script form

Member Avatar for jimdj
0
793
Member Avatar for jackmaverick1

When I try to put the JTextArea in a JScrollPane, it a) doesn't display the menu most of the time, and b) doesn't display the scroll bars, even though I've got more text than the size of the JTextArea. Code (it's a VERY simple error console for something else): [CODE]import …

Member Avatar for NormR1
0
160
Member Avatar for scheppy

Hi I have a small problem with with my bubble sort. Everything else in my program works fine if I remove my bubble sort. This is the part of code for the bubble sort. [CODE] //bubble sort based on animal breed if (numberofanimals > 1)//making sure there is more than …

Member Avatar for NormR1
0
225
Member Avatar for applejax77

I am working on a java program that will count a particular letter in a sentence that the user inputs. Below is the code that I have, but I also want the program to output the sentenced that was typed by the users. Any help would be appreciated. import java.util.Scanner; …

Member Avatar for hfx642
0
206

The End.