35,618 Topics

Member Avatar for
Member Avatar for Ashenvale

Hi guys :D.. just wondering.. when I'm using scanner this is the code I use to ignore the case "to put in the do..while statement" [CODE]} while (choice.trim().equalsIgnoreCase("Y"));[/CODE] I've been looking all over the net. what code should I use if I'm using JOption.. can anybody please help me on …

Member Avatar for thines01
0
206
Member Avatar for BurgerBob

Hi guys, I'm taking a Networking & Internet Systems module... have little experience working with java and am trying to work through an assignment... hopefully you can help! I've been given skeleton code to complete for a program that acts as a simple email client that uses TCP/IP sockets to …

0
88
Member Avatar for nchy13

i am wondering what is the problem here. here text.txt is the input file. any help will be highly appreciated. [CODE]import java.io.*; public class Main{ public static void main(String[] args) throws Exception { File f= new File("text.txt"); BufferedReader in = new BufferedReader( new FileReader(f)); String line = new String(); line …

Member Avatar for NormR1
0
105
Member Avatar for nchy13

i am quite new to java i used to code in c++ but now we have to program in java which has not been taught. i browsed net but casn't get enough information this is my first code which i managed to get from net [B]i am using GNU java …

Member Avatar for nchy13
0
407
Member Avatar for newbie-java

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example …

Member Avatar for stevanity
0
207
Member Avatar for DrFilth

Hi! I’m have been following the JAAS turrial: [url]http://download.oracle.com/javase/6/docs/technotes/guides/security/jaas/tutorials/GeneralAcnOnly.html[/url]. And the program works fine when I compile it from the command prompt in Windows. But when I try to compile and run it with eclipse it gives the error: Error: Could not find or load main class java. I think …

0
115
Member Avatar for junsugal

This is the only part of my assignment that has problem. Can anyone tell me what's wrong? I debug it, it shows me NullPointerException... please give me a hint, i urgently need this to be done. Its due today. So, I am supposed to write a method captured that will …

Member Avatar for NormR1
0
167
Member Avatar for atramposch

[CODE]public Node<E> remove (int index)[/CODE] i need to recursively implement this method. Node<E> nodes contain two fields, next (a reference to the next node in the linked list) and element (a reference to the data it contains) [CODE]public E element; public Node<E> next;[/CODE] Do not worry about the checking for …

Member Avatar for atramposch
0
2K
Member Avatar for coolsport04

I am trying to write a program that kind of resembles and etch-a-sketch. I have the basis for it. I am having two problems: 1. When I draw a shape in the default black color, when I switch the color it changes the color of what I had previously drawn. …

Member Avatar for Ezzaral
0
212
Member Avatar for dennysimon

Hello all Does Caret Event only for one component only ? I tried to find example for more than one TextField which added with CaretListener,but cannot find one. Anybody know website or has example like I need ? I need to know how to detect which component arise the CaretEvent …

Member Avatar for dennysimon
0
133
Member Avatar for kiaski

A number is called a proper divisor of N if M < N and M divides N. A positive integer is called perfect if it is the sum of its positive proper divisors. For example, the positive proper divisors of 28 are 1, 2, 4, 7, and 14 and 1+2+4+7+14=28. …

Member Avatar for Ezzaral
0
257
Member Avatar for Muna Oman

Hello folk i am a new member n i need Ur help to do my course project for developing Sudoku game i already have my codes but i need a code for generating random numbers in the grid this is basically my code [code]import javax.swing.*; import java.awt.*; import java.util.*; /* …

Member Avatar for NormR1
0
657
Member Avatar for skylinepkr

I have an assignment to make a paint program using java but i am kind of stuck at a roadblock. I have a pencil tool and i used the mouseDragged, mousePressed, and mouseReleased methods of mouse(motion)listener to draw my path using general paths (lineTo and moveTo). My question is, is …

Member Avatar for Ezzaral
0
117
Member Avatar for BDan

I am a fairly new programmer still in school, and trying to have my program write the selected information to a designated file. I keep getting an error message on my file OutputStream. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import java.text.*; class ExampleJComboBoxSample extends JFrame implements …

Member Avatar for Ezzaral
0
168
Member Avatar for maurya10
Member Avatar for JRDJ12

Can someone show me what bubble-sorting an int[] of { 5, 4, 3, 2, 1 } looks like? I have to place it inside [CODE]public class SortIntArray { // this method needs your code to be added to work public static void sort(int[] list) {[/CODE] with no calls to any …

Member Avatar for NormR1
0
261
Member Avatar for nchy13

can somebody help me out by providing link to the stuff related to buffer reader in java to read a trace file and store it in array of string.

Member Avatar for Ezzaral
0
361
Member Avatar for Mojtabarahimi

Hi Actually i try to do this programming but i have some problems. I'll become thank you if help me to fix it. It is a simple Ferry Ticketing System with below conditions : FERRY TICKETING SYSTEM A small ferry company has just purchased a computer for its new automated …

Member Avatar for NormR1
0
2K
Member Avatar for sidd1994

hi people i am new to this site ... i needed a bit of help i have got an home work to create this :the use will enter 6 random numbers and the computer will print the series :input: 10,5,6,4,3,6 output: 10 5 6 4 3 6 5 1 2 …

Member Avatar for sidd1994
0
100
Member Avatar for Catobion

Hello, I am new, and this question may seem stupid but I'm kinda lost.. i didn't attend the first classes because I was ill. Can someone help me to construct a pseudo-code for a rectangle like this: ******** * * * * ******** (it doesnt look right - it should …

Member Avatar for stultuske
0
106
Member Avatar for newbie-java

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example …

Member Avatar for stultuske
0
249
Member Avatar for Joey_Brown

Hello Lets say I have these two classes; [CODE] public class BFF{ private String name; private String surname; private Object friendships; }[/CODE] [CODE] public class BFFG<T>{ private String name; private String surname; private T friendships; }[/CODE] Is it possible to create a generic method that could create a Set of …

Member Avatar for JamesCherrill
0
102
Member Avatar for swink11123

i'm so frustrated about my coding :( now i cant even get it right :( assignment gonna due this coming week T^T and i really need help i hope you guys can really solve my problem for me T^T so here is what i did so far >< [code] import …

Member Avatar for jwenting
0
212
Member Avatar for anand01

Hi all, When I run use to add second element in the tree set it shows java.lang.ClassCastException: could any one explain me why [CODE] import java.util.TreeSet; public class Venus { public String str; public static void main(String[] args) { Venus a =new Venus(); Venus b= new Venus(); a.str="obj1"; b.str="obj2"; TreeSet<Venus> …

Member Avatar for ~s.o.s~
0
139
Member Avatar for mary786

The Question is : Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set …

Member Avatar for NormR1
0
204
Member Avatar for greatcornholio

Hi all, im doing a program using java and sql, and im trying to set a textbox with a value stored in a database. thing is: i have a combo with airlines, and each airline has a cost for each seat. so what im trying to do is get this …

Member Avatar for stevanity
0
170
Member Avatar for programing

program enter element and if num is already exist give message enter other number no duplicate my code give me alwayes else condition [CODE]/** * @(#)Enter.java * * * @author * @version 1.00 2011/11/18 */ import java.util.Scanner; public class Enter { public static void main(String []args){ Scanner input=new Scanner(System.in); int …

Member Avatar for stevanity
0
92
Member Avatar for softDeveloper

Hi all, I'm reading to a jtextpane a word document. Everything is fine except for this character \u0169 ( a tilde over an u).. Any suggestions? Thanks

Member Avatar for stevanity
0
73
Member Avatar for rayden150

Im using netbeans gui editor and im trying to add a Jfreechart that is itself in a internal frame, and this internal frame I am wanting to add it to a panel, as you can see in this image: [url]http://www.flickr.com/photos/63259070@N06/6370734167/[/url] The internal frame doesn't even show up on the panel …

Member Avatar for mKorbel
0
356
Member Avatar for autorunman22

Hello guys! Ive finished my last project lately about a program that has a trial version. Now, i want to update it, im thinking of creating a database from a website, then my program reads it (say, [url]www.serials.com/getserial.php?id=[/url][user id inputted]),then my program checks if the serial inputted is original, if …

Member Avatar for autorunman22
0
121

The End.