35,618 Topics
![]() | |
i wont to use shocket programming to create a chat client. and the end users should be given a GUI interface. are there any sample codes available online .. please help me find some sample codes.. | |
I'm in the process of writing a program that generates six random numbers. If I run the program I have so far, there's a bit of a problem. It is possible for this code to generate the same random number more than once. Generally speaking, lottery tickets require the numbers … | |
Im trying to make a counter that tells how many times a name appears with array. I am using a scanner that read the names from a file and stores it an array. It then uses random class to pick a random name. I then stored all the names that … | |
Hi all. I have string contains xml content. I use dom xml parser. Below is my parse code. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc=builder.parse(new InputSource(new StringReader(xmlText))); It works but very slow. too slow. If i write xml to file and parse from file like builder.parse(filePath) then … | |
Okay, I am a new student (to Java--well programming in general) and the first assignment we have is to create a program that computes the future value of an investment based on three user inputs (principle deposit, interest rate, and length of term in years). First of all, I am … | |
Hello, I downloaded some code from coreservlets.com and put the code on BEA WebLogic 8.1. The code is actually from ch4 of the book "Core Servlets and Java Server Pages (Hall/Brown)". I wanted to run a particular html form that one fills out then goes to a servlet. The html … | |
I'm new in Java and supposed to write a program that prints a number into a diamond shape. It doesn't print correctly, can someone point out where I'm messed up? [code] private static void diamondOfAsterisks(int number) { int spaces = number / 2; int stars = 1; int row; int … | |
Hello!!! For my assignment I have to develop small library system. I'm doing ok, I'have developped borrower and book classes and they work just fine... I was wondering if anyone could just suggest how to implement copies for the book. (Sometimes the most popular books will have more copies)I'm not … | |
I need a code that when I'm given two number, the computeer gives me back 4 integers ex) user gives me: "3 & 6" The computer displays back: "3,4,5,6" | |
Can someone point me in the right directions. I have to build on an existing mortgage program. I have to pull interest rates in from an external txt file and have them populate my array. The array will then be used in a combobox pull down. I don't know which … | |
Hello everybody! I am new to the site and to java. I am in week 2 of my java class now and still not sure if I am enjoying it. Unfortunately I would say it is my weakest link in the IT field so I picked this class on my … | |
I have 2 .java files called model.java and table.java I have 3 class files, model.class, table.class and WindowCloser.class (which is in the table.java file). I've looked online on how to make a jar file, but whenever I try, either nothing happens or it says Main-class not found. table has the … | |
With the code below I am getting an error reading long cannot be dereferenced, how can I solve this problem? [code] import java.io.File; public class TestingClass { public static void main( String [] args ) { File actual = new File("."); for( File f : actual.listFiles()) for( File e : … | |
[ICODE] import java.io.BufferedReader; import java.io.FileReader; import TokenizerProcess.StringTokenizer; import javax.swing.JOptionPane; public class ReadFile { public static int count = 0; public static String[][]file = new String[6][3]; public void isReadFile(){ SubjectInput input = new SubjectInput(); try{ BufferedReader reader = new BufferedReader (new FileReader("SubjectFiles/subjects.txt")); String line; while((line = reader.readLine())!=null){ StringTokenizer tokenFile = new … | |
I am writing a program in which I have done ALOT of coding already but there are still problems and features to be added. So far my program: 1) Takes data from a .dat file and displays it on a table 2) There is a button for which you can … | |
Can u people help me in getting java code to transfer files (FTP) over the LAN.Give me the complete code for this. I wan that a FTP request to be send to the desired host and if the host accept the request then the browse menu be opened that allows … | |
I am using asp.net 3.5(visual studio 2008) and sql server 2005/2000. I want code for validation of Account number and password. i.e. when user enter the Accountno and password and click submit button it should check the data with that enter in database. If it is correct it should go … | |
Hello, have a good day everyone. I am confused if what elements are to be inserted in a queue. Are only numbers can be inserted in a queue? Are letters or word(e.g."Subject") can be inserted in a queue? Thank you ahead everyone. Have a nice day. | |
I am trying to figure out how many ways you can go if you only take one or two steps. For example. If the number is 4 there are 5 ways you can move going one or two steps. I have to do it with recursion. I have the following … | |
[CODE]public class table extends JPanel implements ActionListener{ JButton addInfo; public table(String dataFilePath) { JTable table; model model; Font f; f = new Font("SanSerif",Font.PLAIN,24); setFont(f); setLayout(new BorderLayout()); model = new model(dataFilePath); table = new JTable(); table.setModel(model); table.createDefaultColumnsFromModel(); GridLayout layout = new GridLayout(80,30); addInfo = new JButton("Add Data"); addInfo.setSize(80, 30); addInfo.addActionListener(this); //action … | |
I am a begginer and i know almost nothing in java. our prof has asked me to write a program that computes 50 employees salary (normal,overtime and bonuses) ,print the result and keep a back up. can somebody please help me write the code. | |
I want to connect to sybase from java using jdbc:odbc bridge.. Which driver should I use like I have used "ODBC for Oracle" Plz help.. | |
Dear Friends I have working knowledge of java. but when it comes to make a java reportsi don't know how to proceed. will any one help by guiding me or by providing me some tutorials to make reports in java. i am unable to visualize a solution. i don't understand … | |
Help .. I'm supposed to make a java program that will create an output of increament whre the last number is 10 and the series is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .. it's like counting to 10.. we're supposed to use a do-while loop or … | |
I'm a computer science major with a background in C++, not Java. My professor told the class that the Scanner class has a nextInt(), nextDouble(), nextFloat(), etc for every primative type. But whenever I try to use nextChar(), the compiler gives me an "undefined symbol" error. That means that there … | |
hello.. i really need help.. I don't know why i keep on getting an empty stack if i pop a token from stack even if user has already push a token into it.. [code=java] public class MStack implements Stack{ public Node top; public Node[] stack; public static int T[]; public … | |
i want to make one website in jsp.. ... can any one help me....about coding....plz.... | |
actualy i need help i m making a software in java swing i hv a problem in retriving values from database in JTable, i m inserting values in database ms access it works, following is my code one is for database another one for table ..................................................................................................................................... [code] import java.sql.*; public … | |
hello guyz,,i just want to ask if you know a site that have a free ebook that would explain best the data structures..we have a problem to code..and it is about queues,,and sorting,,and i hope to find a best ebook that will explain best about the sorting and the queues,,,thanks … | |
Dear Friends I have working knowledge of java. but when it comes to make a java projects i don't know how to proceed. will any one help by guiding me or by providing me some tutorials to make my first project in java. i am unable to visualize a solution. … |
The End.