32,204 Topics

Member Avatar for
Member Avatar for challarao

Hi all, A problem asks me to create a point class,line class composing two points, a triangle class composing three lines.Also a right angle triangle and an equilateral triangle class both inherit triangle class.I did this. public class Point{ private int x; private int y; public Point(int x,int y){ //error …

Member Avatar for jalpesh_007
0
193
Member Avatar for anand01

Hi all, I know that Vector is synchronized, when I run the following program public class ClassA extends Thread{ static Vector<Integer > v=new Vector<Integer>(); public void run() { callMethod(); } public void callMethod() { System.out.println(v.size()); v.add(0); System.out.println(v.size()); v.remove(0); } public static void main(String[] args) { for(int i=0;i<1000;i++) { ClassA a=new …

Member Avatar for anand01
0
184
Member Avatar for bcassillo

Here is my code.... It is supposed to go throught this maze and can move where there are "." and blocked by "#". I keep getting an out of bounds error. Can anyone help me? import java.io.*; public class ProgramMAZE { public static char maze[][]= {{'#', '#', '#', '#', '#', …

Member Avatar for NormR1
0
195
Member Avatar for Monkey101

Mirroring is done by copying. Suppose a Picture has H rows of Pixels and W columns of Pixels and W is an even number, like W is 2N. Here N is a the whole number that is exactly 1/2 of W. How many Pixels are copied when the Picture is …

Member Avatar for NormR1
0
112
Member Avatar for Malymieczek

Hi All, For homework I had to write a "guessing game" program, which I decided to take to another level and add on the option to add names and keep a score, etc. The problem is however, That my program will not display the text "*Player* Has Won! Congratulations!". Here …

Member Avatar for NormR1
0
160
Member Avatar for nah094020

Ok guys i have a few questions about implementing a gneric hash table using linear probing. Ok first, i need to make an entry class Entry<K,V> then An Entry <K,V> table array but since its gneric must initiatied elsewhere my question is how does the class entry work , from …

Member Avatar for NormR1
0
2K
Member Avatar for coolbeanbob

I would like thoughts/advice on the project I am working on. I am trying to build a program that simulates the score of a baseball game given individual player statistics. As of right now, the program only has one team batting for nine innings. I am a computer science student …

Member Avatar for JamesCherrill
0
192
Member Avatar for riahc3

Is there any easy IDE that lets you build a easy GUI with Java? I wish you could comply native Java using VS! :P

Member Avatar for ~s.o.s~
0
296
Member Avatar for gotto

I have created an awesome text-based battle game, and i want others to see it. Is there a way to put this game online, without others stealing the code, but they can play it?

Member Avatar for Aladinone
0
225
Member Avatar for minimee120

Hi all, can someone help me find what's going wrong in my code? When the program runs and it goes to get the user input, the program does not respond with any feedback, ie I type find Susan, and it does not tell me if Susan is in my txt …

Member Avatar for NormR1
0
245
Member Avatar for sapure

In this example, what's the difference between creating a class variable from the "class Employee" & creating an object from the class GenQueue ?! What's the difference in uses and implementation? import java.util.LinkedList; class GenQueue { private LinkedList list = new LinkedList(); public void enqueue(E item) { list.addLast(item); } public …

Member Avatar for riahc3
0
229
Member Avatar for elzaz

Hi, I am looking for a java code which will provide the automatic login with out loading the login page also.After login automatically, i want to go to next page automatically. Can anyone help please..

Member Avatar for riahc3
0
38
Member Avatar for kristenw17

So I am trying to make a code that will read a file that contains an unknown number of students and an unknown amount of scores for each student. Then output each students average score. I have tried several different combinations of loops and each times some problem comes up. …

Member Avatar for JamesCherrill
0
323
Member Avatar for caswimmer2011

Hi, I've used keylisteners multiple times, but I am having trouble with this situation. I want the keylistener to recognize a series of characters. For example, if 'e' is typed, I want the program to listen for 'l', then 'e', etc. (spelling "elephant", if you wanted to know). It recognizes …

Member Avatar for JamesCherrill
0
228
Member Avatar for hwoarang69

lets say i am print a image on screen. with (x1,y1,x2,y2,sx1,xy1,sx2,sy2) g.drawImage(player_image, x, y, x+width, y+height 0, 0, 30, 20 ,Sprite_Sheet.m1); so how would i flipthis image vertically.

Member Avatar for hwoarang69
0
130
Member Avatar for asiawilliams

I'm taking a beginning java class and I'm trying to create a helper method to get a input from a user and combine all four methods into a package I can use in my programs after. I keep running into trouble with the last method, getMenuStringFromUser, the error it gives …

Member Avatar for Taywin
0
469
Member Avatar for DarkMonarch

Hey, been awhile. I'm working on a portal for distributors, some type of JIT (just in time) implementation. Now i've been reading alot on DB so i can implement the right database and the right data structure. Now i see, i can do alot more then i'm use to do. …

Member Avatar for madCoder
0
151
Member Avatar for kadambari.nalavade.1

write a program to perform polynomial operations like addition, subtraction, multiplication and evaluation of polynomial using ADT in java

Member Avatar for JamesCherrill
0
31
Member Avatar for Malymieczek

Hi all, Im having trouble with a program wheree a person starts in the middle of a 7 foot bridge. Heres the description: Someone is standing at the center of a bridge that is 7 ft bridge long. Their stride is exactly one foot. They can’t control the direction they …

Member Avatar for Taywin
0
943
Member Avatar for georget1011

This is my Java code at the moment (using netbeans IDE), I have tried to set th value of cell 4,4 to A in the following code, `outputCadence.getModel().setValueAt(items.A[5], 4, 4);` , however this does absolutely nothing, I'm a bit of a noob so I'm not sure if I'm missing something …

Member Avatar for mKorbel
0
1K
Member Avatar for sneha_07

i am working on making a scientific calculator in netbeans using wing components and i used combo box for conversion purpose but the handler code i wrote isnt working for all conversion, it only works for the 1st item. and please help me with "action" and "item" on the right …

Member Avatar for stultuske
0
130
Member Avatar for cutekaranr

hi all, i am new to java programing... i have used jDateChooser and i want to extract just month i.e. int value of selected month or date i.e. int value of selected date from jDateChooser......? Eg. if choose date as 2012/11/07 I want all in separate like Year = 2012 …

Member Avatar for stultuske
0
150
Member Avatar for samdanield

<project basedir="/home/ubuntu/apache-jmeter-2.7"> <property environment="env"/> <property name="jmeter-home" location="/home/ubuntu/apache-jmeter-2.7"/> <path id="ant.jmeter.classpath"> <pathelement location="${jmeter-home}/lib/ant-jmeter-1.8.4.jar" /> </path> <taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" classpathref="ant.jmeter.classpath" /> <target name="clean"> <delete dir="results"/> <delete file="jmeter.log"/> <mkdir dir="results/jtl"/> <mkdir dir="results/html"/> </target> <target name="test1" depends="clean" > <jmeter jmeterhome="/home/ubuntu/apache-jmeter-2.7" resultlogdir="results/jtl" testplan="/home/ubuntu/pt/********.jmx" /> <xslt in="${basedir}/results/jtl/********.jtl" out="${basedir}/results/html/*********.xml" style="${jmeter-home}/extras/jmeter-results-report_21.xsl"/> </target> </project> when i build this file its …

0
44
Member Avatar for Asan23

i am having a problem getting my js file to work with my html file here is my jsfile function calculateTotal () { var hours = document.getElementByName("hours")[0].value; alert(please enter a number) var payrate = document.getElementByName("payrate")[0].value; alert(please enter a number) var pay = document.getElementByName("pay")[0].value; if (hours <= 40){ pay = (hours …

Member Avatar for dcdruck
0
150
Member Avatar for moneypro

Hi, Thanks to all in advance. I am a newbie java learner. I have to create a project on java for my final term exam. But I cant find the topic of the project. Please suggest me some good but unique project topic. note: I would not like to create …

Member Avatar for moneypro
0
128
Member Avatar for shaneos

I'm trying to develop a packet sniffer using java and I've been using the JpCap library to capture the packets. I've run into a problem where Jpcap is capturing the packets from the NIC on my desktop, but I need to capture the packets from the gateway (MikroTik RouterBOARD) and …

0
123
Member Avatar for sapure

I've been studying C++ for two years, then started Java two months ago. My performance in C++ wasn't good at all although I study hard. I thought that the problem is in not understanding the language concepts but when I started a new language with the intention of building up …

Member Avatar for sapure
0
178
Member Avatar for Kronolynx

the applet compiles fine(no errors) but while running when i press the accountButton(only button in the applet) i get errors, what is wrong with my applet ? thanks in advance Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at AppletMetodos.actionPerformed(AppletMetodos.java:96) at java.awt.Button.processActionEvent(Unknown Source) at java.awt.Button.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at …

Member Avatar for Kronolynx
0
310
Member Avatar for vjjohnson04

public class hello_world { public void sample(){ System.out.println("Hello World"); } }; /*Now I can access this method using an Instance of it in my Main Class or by inheriting it.* Public Class main{ public static void main(String args[]){ hello_world sam = new hello_world(); sam.sample(); }; } /*Class using inheritance Public …

Member Avatar for Taywin
0
307
Member Avatar for techgeek420

Hey Guys, This is my first program where I have used JLabel and JText. Im trying to create a program that will solve a simple quadratic equation. I have the program to the point where it will solve the equation, I just cant get it to display in the window. …

Member Avatar for stultuske
0
186

The End.