32,204 Topics

Member Avatar for
Member Avatar for thebigbroski

I was working on Problem 17 on Project Euler: [url]http://projecteuler.net/index.php?section=problems&id=17[/url] and I'm stuck; my answer is close, but not correct. I got the answer 21108 with the following code: I do realize the code can be optimized, but I would like to simply get this to work, and not try …

Member Avatar for thebigbroski
0
521
Member Avatar for 24x24

First off: I am not looking for somebody to do my homework. Although it would make it easier for me in the short term, please don't "help" me by writing my code for me. I would rather lose points for being late and understanding the code than get the grade …

Member Avatar for peter_budo
0
134
Member Avatar for nalbertini

Hi People, When creating this program, I am trying to add a while loop so that I can continue to pull in input from the user until they put a -1 for the input. This is the error I get. java:46: cannot find symbol symbol : variable input location: class …

Member Avatar for peter_budo
0
206
Member Avatar for StevoLord

Okey now the problem is that if the previewFrame is set to the default layout the buttons show but since it is using a layout manager the setBounds,setLocation,setSize commands dont work. So I used the code previewFrame.setLoayout(null) which would let me set my own position of the buttons on the …

Member Avatar for StevoLord
0
143
Member Avatar for Oblivious21

Hey guys and gals I need alittle help. i have an assignment that needs to print a certian number of stairs according to a user input. Example program run (user input is in bold): Please enter the number of rows: 4 Please enter the number of stars in row 1: …

Member Avatar for Oblivious21
0
151
Member Avatar for carlitosway17

Hi we are supposed to modify this class for my school project to create a code that will print out a rectangle made of asterisks * something like ********* * * * * * * * * * * ********* here is my code [CODE] // Exercise 7.21: TurtleGraphics.java // …

Member Avatar for carlitosway17
0
168
Member Avatar for dasatti

I started developing an HTML editor using Java. After spending a lot of time I am now stuck in between. Most of the things are done but now I don't find any way to implement some of very important features. [B]I think[/B] java is too weak too support these features. …

0
105
Member Avatar for zeeya

Hello.. I'm new with java and have some problem with my assignment. I want to write a class named phoneBookEntry that has field for a person name and phone number. The class should have a constructor and appropriate accessor and mutator method. Then, write a main class that create five …

Member Avatar for peter_budo
0
1K
Member Avatar for draven07

..Hi to all...just want to ask.. ..I have already created an ideal layout for my calculator..my problem is...I dont know how to insert a value into a field everytime I press a button(0 to 9)..without deleting the previous integer after I press my operator.. ..how shall I do so..??..

Member Avatar for draven07
0
95
Member Avatar for srinivasan106

is it possible to send an sms through JAVA.. My requirement is a chat application like Rediff bol. am able to do chat using networks. but can i be able to send sms. just like when i press a button called send sms then a window needs to get a …

Member Avatar for peter_budo
0
79
Member Avatar for coco24

Is this a simple way to return the number of occurrences of theValue in a bag? [code] /** * Return the number of occurrences of theValue in the bag. */ public int countOccurrences( String theValue ) { // fill in code for(int index = 0; index <= topPosition; index++ ) …

Member Avatar for javaAddict
0
79
Member Avatar for Poopster01

If you read the Prologue section of the code I posted it will give you an explanation of what I am trying to accomplish with this program. The problem I am having is that I am unable to find an example of how to pass an argument through the string …

Member Avatar for Akill10
-1
324
Member Avatar for haribasker

please help me import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.net.*; import javax.swing.border.*; /** * Summary description for userlogin * */ public class userlogin extends JFrame { public static ServerSocket ssoc1; public static Socket sousoc1,ss1; // Variables declaration private JLabel userlabel; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; …

Member Avatar for JamesCherrill
0
3K
Member Avatar for wailoon88

hi, good day to you, [url]http://java.sun.com/developer/technicalArticles/ThirdParty/WebCrawler/WebCrawler.java[/url] :-/ can anyone run this code in eclipse IDE ? because i cant seem to run it though and it caused errors. Is this code meant to run in IDEs ? thanks for visiting this thread and hope you can help me.

Member Avatar for peter_budo
0
139
Member Avatar for JGriffCS

I'm trying to create a class that reads in a set of numbers from a file, stores them in a generic array, and then sorts them using the generic bubbleSort method. I usually write in C++ and the switch from templates to generics hasn't been easy. I'm fairly certain my …

Member Avatar for JamesCherrill
0
701
Member Avatar for gretty

Hello [B]I am experimenting with Java applets & communicating between a Servlet & an applet. I am experiencing a HTTP 501 error when I go to retrieve the input stream from my URLConnection object.[/B] I know that the 501 error means that I am attempting to perform an action that …

0
67
Member Avatar for boifang

this code does not compile successfully because of the error which says update is not an abstract and does not override abstract method validate in line 5 and line 14 class updateinfo implements validateinfo [CODE]public interface validateInfo { public void validate(String empcode, String password); } class updateInfo implements validateInfo { …

Member Avatar for Momerath
0
106
Member Avatar for commando1200

Im trying to make a tax and tip calculator and whenever the tax comes up it goes 10 or more decimal places and im trying to restrict it to two. [code=java] public static void main(String[] args) { double cost, total, tip, taxtotal, tiptotal, subtotal, grandtotal; Scanner myScanner = new Scanner(System.in); …

Member Avatar for commando1200
0
194
Member Avatar for SavnetSinn

Hey all. I'm in the process of learning Java in my spare time, and I've bumped into a problem that I'm having a hard time wrapping my head around. I'm writing a small game (currently little more than an animation) involving a handful of blocks moving on-screen. I've created a …

Member Avatar for SavnetSinn
0
3K
Member Avatar for eikal

Hi guys, my program im working on ends when it shouldnt..... here's the main method. [code] public static void main(String[] args) { String answer; do { boolean whole=false; boolean whole2=false; Scanner sc = new Scanner(System.in); int one=0, two=0; do { try{ System.out.print("Enter the first whole number: "); one = sc.nextInt(); …

Member Avatar for ztini
0
151
Member Avatar for BuhRock

I am using an array to store 5 test scores. Then I have another array for the total possible score the test could have. I just need to find out what percent the grade is out of the total possible score. [CODE]public class Main { /** * @param args the …

Member Avatar for Katana24
0
100
Member Avatar for carlitosway17

Hi Am currently taking a Java class and we are supposed to use turtle graphics to draw the following shape rectange made of Asterix ************* * * * * * * * * * * * * * * ************* My program builds and compiles successfully but I cant get …

Member Avatar for carlitosway17
0
255
Member Avatar for newcoder310

Hi What is the best way to go forward with finding all possible combinations of nCr Eg: 5C3 for the number 12345 123 134 135 145 234 235 345 Like that thanks

Member Avatar for ztini
0
130
Member Avatar for wailoon88

hi guys.. can any gurus give me a hints or tips on implementing TF-IDf on java ? how do i start first? i am kinda confused here.. is it i need to read the file and count the words first ?

Member Avatar for ztini
0
66
Member Avatar for yukikazemedia

Hi, I have this really important project where in, I must perform the following tasks. VIEW - view records that are present in the database using a "primary key" ADD - add new records to the database EDIT - a specific line in the said record within the database [INDENT]Under …

Member Avatar for javaAddict
0
184
Member Avatar for bugista

Hello All I was using Java for capturing the screen and printing it. Now I need to capture the window, which is a ALt +Printscreen of Windows. I tried in Java. Could you pls help? Thanks in advance

Member Avatar for zach&kody
0
92
Member Avatar for coolcool1980

Hi folks, I have a java maze, I cant seem to pass the 2d array to the next method. Any ideas on how i can do this? I need to get the character to move around the maze. Thanks [CODE] public class arrayAttempt1 { static int i=0; static int j=0; …

Member Avatar for coolcool1980
0
3K
Member Avatar for Phatsimo Mosiam

helow everyone!when i execute the following code,i have saved it as validateInfo.java it tells me that line 5:duplicate class:validateInfo.Please help public interface validateInfo { public void validate(String empcode, String password); } class validateInfo implements validateInfo { public void update() { //code to update information of customer } public static void …

Member Avatar for javaAddict
0
104
Member Avatar for Shizuo

[code]import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Books extends Applet { Choice b; String [] blist; //CheckboxGroup edition; int i; public void init() { setBackground(Color.green); add(new Label("Please Pick a Book:")); b = new Choice(); blist [0] = ""; blist [1] = "Java Programming"; blist [2] = "C# Programming"; blist …

0
95
Member Avatar for thes0mething

I'm currently working on a tic-tac-toe program and it is working to the point that it runs and X's and O's appear. However when the right combination is made or the board gets full the method "Resultat();" should recognize it and "Clear();" should clear out the board and a JFrame …

Member Avatar for thes0mething
0
149

The End.