32,204 Topics

Member Avatar for
Member Avatar for 03hasnam

please consider the following file of given staff. [CODE]Bob 100100653 5860 London H3ll0 1[/CODE] How do i extract the 6th line for multiple files and generate a report in java for each files under same directory? the above is just one file data. i want to read multiple files and …

Member Avatar for NormR1
0
375
Member Avatar for skiabox

I am reading the book Head First Java. Reading the chapter 'networking and threads' I tried to run a project in my Eclipse IDE that consists of a chat server and chat clients. The problem is that I am getting no feedback in the clients text area and debugging seems …

Member Avatar for skiabox
0
347
Member Avatar for Nordijac

Hi, I'm a beginner with Java and I've encountered some trouble with simple I/O. Thing is, I have to enable the command line and write a file name of a textfile which holds a simple number. That number I have to get from the file and into JGrasp and print …

Member Avatar for JamesCherrill
0
164
Member Avatar for Ratman69

So, I need to make a flash card app on java and I'm planning on using blueJ. My main problem is that I don't really understand how to make a menu interface in which you can choose to flip the card, go to the next card, etc. Thats my main …

Member Avatar for NormR1
0
74
Member Avatar for mehnihma

Can someone help me with this? I have proble with Array Lists , As you can see in the ouput I get same values but I need to put in different values , what am I doing wrong? Thanks in advance and Happy New Year! [CODE] import java.util.*; public class …

Member Avatar for mehnihma
0
636
Member Avatar for JavaPrograms

My task is to: Pick 10 of my favourite NBA or NHL players from 2 top teams and display the player name, team name, points, rebounds, and assists for each of them. I then have to store this information as a table in a .txt file (This part is completed). …

Member Avatar for David Kroukamp
0
425
Member Avatar for xanawa

Hi i am trying to connect with the data base with the following code but it is giving me an error. [B]CODE:[/B] [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dbaccess; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import …

Member Avatar for stephen84s
0
229
Member Avatar for crbsathy

Hi Friends, I have a doubt in accessing the memory address . In java there is no pointers like c . then how can we access the address of the memory variable.

Member Avatar for JamesCherrill
0
1K
Member Avatar for gourav1

hello! i m reading servlets these days and i want to read about structs and sessions.please give me links here so that i can read about them and so that i can make some application(web) based on concept of these two. i have searched google and also find many things, …

Member Avatar for stultuske
0
129
Member Avatar for gourav1

please tell me what exactly buffer is ? i have searched google.com a lot but not find what exactly it means ? what it means if i say "flushing the buffer"..? please tell me..what exactly is it ??

Member Avatar for gourav1
0
141
Member Avatar for gourav1

[CODE]PrintWriter file= new PrintWriter(new FileWriter("league1.txt",true)); file.print(value1); file.print(','); file.print(value2); file.print(','); file.print(value3); file.print(','); file.close();[/CODE] i m using this code to write in a file.. i m using this in servlet.value1, value2,value3 are Strings. and i wana to write it in file named "league1.txt". i have made this file in WEBPAGES folder in …

Member Avatar for gourav1
0
268
Member Avatar for anand01

[CODE] Set<Integer> set = new HashSet<Integer>(); Integer i1 = 45; Integer i2 = 46; set.add(i1); set.add(i1); set.add(i2); System.out.print(set.size() + " "); set.remove(i2); System.out.print(set.size() + " "); i1 = 47; System.out.print(set.toString()); set.remove(i1); System.out.print(set.size() + " "); [/CODE] The result of this code is 2,1,1 but my expectation is 2,1,0 Could any …

Member Avatar for anand01
0
114
Member Avatar for scheppy

I have a extremely small problem, I think its my own fault, but i just cant seem to find what it is. I'm making a program with a gui, and in the gui there is a main menu with 2 JButtons. When I click on a JButton the JPanel/JFrame is …

Member Avatar for scheppy
0
165
Member Avatar for dennysimon

hello all my part of code give me message to recompile with -Xlint:unchecked How to fix this code so the message gone thank you denny [CODE] if(file.exists()) { FileRead fr=new FileRead(); String astring=fr.Read(filePath); System.out.println(astring); /* delimiter */ String delimiter = ","; /* given string will be split by the argument …

Member Avatar for dennysimon
0
2K
Member Avatar for Jenna1994

this is the program i have to write you have to write a program using java language which will realize the following scenario project scenario:when you run your program it will display a welcome messege (you choose ur welcome messege). then program will ask to input a number beetween 1-9999, …

Member Avatar for Philippe.Lahaie
0
185
Member Avatar for thejoker011

hello everyone... i need some good open source Graphs and Charts gui(2d and 3d) for java. Please suggest me some.

Member Avatar for peter_budo
0
299
Member Avatar for akingcool

I am trying to design a file reader with some sort of GUI so I decided to use JOptionPane. I am a complete noob trying to learn java. So far, I have managed to make my program produce a pop up for the file location, and also an error message …

Member Avatar for mKorbel
0
3K
Member Avatar for if10066

I have a project, it's simple game just to make a game called congklak. it is traditioanl game from Indonesia. The project has finished, and work, well compiled, all components like package, database (*.mdb), and all the pictures are read by programs. But when it's deployed, the pictures and database …

Member Avatar for stephen84s
0
179
Member Avatar for ujjwal koirala

complie first java type the fllowing command & view the bytes codes java-c first.

Member Avatar for thines01
-3
34
Member Avatar for ramanareddy438

I installed Java using .bin file. The folder i installed is JDK(/usr/lib/jdk1.6.0_29) and JRE(/usr/lib/jre1.6.0_29). I googled to set classpath but that things didn't work for me. Can any one suggest me commands using the folders that i mentioned above, to set classpath to execute a sample java program.

Member Avatar for ramanareddy438
0
238
Member Avatar for gourav1

hey! i have made a List object as follows: List error = new LinkedList(); and then as per my requirements, i have added strings in it. like error.add(); like this. so, now at some time, i want this list to be empty, so i was doing error=null; which is giving …

Member Avatar for gourav1
0
137
Member Avatar for Mr.BunyRabit

Hey there, is there a way to convert a string to a tree path? i can convert a path to a string, but not the other way around... [CODE]jTree1.getSelectionPath().toString()[/CODE] thats the only way i know.. nooo idea how to convert it back??

Member Avatar for Mr.BunyRabit
0
873
Member Avatar for Mr.BunyRabit

Hey there. I have a program that uses access, and everytime i go to install it for some one i have to keep my fingures crossed and hope they have office installed on their pc. Is there a way to run my program without buying microsoft office? (using access database) …

Member Avatar for Mr.BunyRabit
0
801
Member Avatar for deepdon

I am getting java.lang.nullpointer exception for this code plzz help me out all database linked programs are creating same error [code]import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class retser extends HttpServlet { Connection c; Statement st; ResultSet rs; ServletConfig config; public void init() { config = getServletConfig(); try …

Member Avatar for stultuske
0
140
Member Avatar for Priya Dharsini

import java.net.*; import java.io.*; import java.util.Date; import java.util.*; public class crawling { //Properties private String startUrl; private int maxUrls = -1; private boolean limitHost = false; private boolean crawling = false; private Date currentDate; private int counter=0; // Set up crawl lists. HashSet crawledList = new HashSet(); LinkedHashSet toCrawlList = …

Member Avatar for stultuske
0
323
Member Avatar for scheppy

Im trying to make a simple program.It just has a couple JButtons and JTextFields, but its looks kinda odd, and I was wondering how to change their size. Thanks In advance Scheppy

Member Avatar for scheppy
0
79
Member Avatar for donlee

Dear Master, I have some confuses problem, I have an java window application that has been used almost 2 years more, suddenly today, when i run the application, error message come out "this application is corrupt". I try to run in others (almost 5 workstation), the result is same. any …

Member Avatar for dmanw100
0
191
Member Avatar for lethal.b

I have to create a midlet using netbeans. It says have 1 form that allows the user to enter data. Second form shows a gauge. The third form displays results. It must also have 2 threads. 1 thread that reads the users input and another thread that carries out some …

Member Avatar for dmanw100
0
118
Member Avatar for sunmania

Hi Friends how to extract following data and store in string variable. All variable are string no need to use any other data type like datetime and so on. [CODE] Deposits and Additions Date Description Amount Refe 11/01 Test1 201f13050000100 NEWEDGE 1,500,000.00 OBI:FFC SAN LAZARO, SA A/C 430 11/01 Test2 …

Member Avatar for dmanw100
0
2K
Member Avatar for scheppy

[CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; /* *Created by ************ *on Dec 28 *to calculate the area of multiple shapes */ public class AreaCalculator extends JFrame implements ActionListener { static JTextField triwidth, trihieght, recwidth, reclength, cirradius; static Container contentPane; static JPanel infoPane; static double circlearea; static JLabel circleanswer; public …

Member Avatar for scheppy
0
249

The End.