35,618 Topics
![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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. … | |
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 … | |
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. … | |
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.*; /* … | |
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 … | |
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 … | |
how can I read trace file in java and store it in an array. | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … |
The End.