32,199 Topics

Member Avatar for
Member Avatar for hasbeenbad

I have a web app that creates an employee.txt file, how do I go about printing the contents of the file from a form? [CODE]<%-- confirmation.jsp --%> <%@ page session="false" import="java.util.*" %> <%@page import="java.io.InputStreamReader"%> <%@page import="java.io.BufferedReader"%> <%@page import="java.io.DataInputStream"%> <%@page import="java.io.FileInputStream"%> <%--Retrieve the Employee and Hiring beans from the Request scope--%> …

Member Avatar for NormR1
0
134
Member Avatar for knowledgelover

Hi all I am new to SIP implementation specifically using SIP, I need to use it in a Call Center, as a PBX, in other words, to write the PBX server , and the clients call each other, all are SIP, where to start from , links, tutorials would be …

Member Avatar for onstate
0
123
Member Avatar for hermann87

Hello again, another question today... Based on this example : [CODE] public interface A { public boolean booleanA = true; public boolean booleanB = true; public boolean booleanC = true; } public interface B implements A { public boolean booleanA = false; } public class Example implements B { public …

Member Avatar for NormR1
0
79
Member Avatar for Zetlin

Hello everyone, first of all I would like to say that I'm new to java and I'm getting this error while trying to compile a program from a book that I am using to learn the language. Ok so the program is very basic just two classes here is my …

Member Avatar for javaAddict
0
1K
Member Avatar for adams161

I use almost every day, [url]http://www.mibbit.com[/url] It's a web client for IRC. It has one real nice feature. when i type, if i misspell a word, it sort of writes a line through the word, and i can right click for spelling suggestions. I think actually it might be my …

Member Avatar for askkuber
0
154
Member Avatar for daudiam

[CODE]ReferenceQueue rq=new ReferenceQueue(); SoftReference <class> ob=new SoftReference<class>(object_of_class,rq);[/CODE] The API says that all weak and soft references are cleared as they are enqueued. So, for the above code, as soon as the JVM sees that "object_of_class" is softly reachable, it will enqueue it, and clear the soft reference. "clearing the soft …

Member Avatar for daudiam
0
98
Member Avatar for daniiii

Hi guys, First, many thanks for reading my post, happy to have found you! I have data(objects) that is stored in a hashmap, my goal is to store this data in a JTable, using a separate cell for each entry, rather than starting on a new column each time. I …

Member Avatar for daniiii
0
178
Member Avatar for NewOrder

[CODE]import java.io.*; class Dictionary { public static void main(String[] args) { Console console=System.console(); System.out.println("Please enter the next number"); String input; input=console.readLine(); String[] Hebrew={"ehad", "shnaiim","shalosh","arba","hamesh","shesh","sheva","shmone","tesha","eser"}; String[] English={"one", "two","three","four","five","six","seven","eight","nine","ten"}; for(int x=0;x<Hebrew.length;x++) { if(input.equals(Hebrew[x])) { System.out.println(English[x]); } } } { while(!input.equals("enough") ) //i want to make a condition that if the program doesnt …

Member Avatar for NormR1
0
130
Member Avatar for Member 785468

Hi all, I am in need of converting my java code to c. Do u have any idea about the converter software like c to java? Thanks.

-1
50
Member Avatar for Member 784790

I m working on a project. And in it i get problem for pattern matching.I have ipv4 ip address for ex " 127.3.0.1* ".I have to generate regular exp for pattern matching in Java.Can you guide me what can be its regular exp. thanks, preeti

Member Avatar for peter_budo
0
99
Member Avatar for orcboyx
Member Avatar for javaAddict
-1
883
Member Avatar for fsl4faisal

interface A { public boolean bA=true; public boolean bB=true; public boolean bC=true; } interface B extends A { boolean bA=false;/*(here bA i think is ambiguous how does compiler know which value to take )* } class C implements B { public void printbool() { System.out.println("bA="+bA); System.out.println("bB="+bB); } } public class …

Member Avatar for JamesCherrill
-2
107
Member Avatar for prem2

Hi Daniweb team, I need to understand newinstance in java.I do no how to implement it and i tried this program but getting some errors. 1.Can anyone tell me how to use new Instance and what mistakes i have made in this program.? [code] import java.io.*; public class sample { …

Member Avatar for prem2
0
98
Member Avatar for echellwig

Hi, I am trying to interface between Java and Python in a program called Eclipse. Any insight on how to do this would be helpful. Thanks! Elise

Member Avatar for jcao219
0
113
Member Avatar for pinsickle

In reguards to the remove function, what happens if you remove and item from the middle of this list? For example, say the list size was 5 (elements 0 - 4) and element 3 was removed. Would element 3 now contain a null value or would everything past element 3 …

Member Avatar for pinsickle
0
124
Member Avatar for Brandon515

ok what i'm trying to do is make a pong game in an applet. here's my code: [CODE]//<applet code = Pong width = 800 height = 600></applet> import javax.swing.*; import java.awt.event.*; import java.awt.*; import com.bruceeckel.swing.*; public class Pong extends JApplet implements KeyListener { int px1 = 770, px2 = 20, …

Member Avatar for NormR1
0
106
Member Avatar for The king

hi all, hope u r fine, i need a help in how to create a hidden txt file from java code and write to and read from it ,, regards :)

Member Avatar for NormR1
0
64
Member Avatar for Dehatim

I am taking my first class in Java and am having problems with converting lowercase letters to uppercase and am not having success. The program compiles and executes. However, the lowercase letters input by the user are not converted to uppercase. I think the problem is very simple, but I …

Member Avatar for Member 784908
0
699
Member Avatar for bondito

I am a final year computer/networks student, i would like to build a chat/video communication system between two computers or more.I need advice on what sort of software/develpoment methods is required to build the system. I was thinking of using Java to program the system, but really dont know where …

Member Avatar for Nick Evan
0
211
Member Avatar for prem2

Hi daniweb team, I need to understand newinstance in java.So i tried the below program and got the error. Can any one know how to write the newinstance program and explain the code. import java.io.*; public class sample { public static void main(String args[])throws IOException{ one obj=one.newinstance(); obj.one(); } } …

Member Avatar for javaAddict
0
85
Member Avatar for Member 784795

A program that will ask only 3 times for inputting the correct password. The input/output in main.'Four user defined methods -add(), multiply(), arraymanipulation(), stringcases(). While or do-while should be used to repeat the process. On the: arraymanipulation() - input three integers then get the sum and average(2 Decimal only) using …

Member Avatar for javaAddict
0
67
Member Avatar for asad_80

Hi, I am writing a program to change the image of the button when it is clicked and image gets replaced to the original image when the button is clicked again. Have used array of button to do this. I have used integers whose value will continue to change as …

Member Avatar for NormR1
0
100
Member Avatar for yap_1991

Hi All I really need help in this. Im supposed to "extract" information from text files . the text files looks somethings like this: MODEL 1 ATOM 1 N SER A 253 -19.559 -25.512 -41.130 1.00 0.00 N ATOM 2 CA SER A 253 -18.749 -26.500 -41.895 1.00 0.00 C …

Member Avatar for NormR1
0
633
Member Avatar for NewOrder

[CODE]import java.io.*; class Ex33 { public static void main(String[] args) { Console console=System.console(); System.out.println("Please enter the next number"); String input; input=console.readLine(); int n1; n1=Integer.parseInt(input); int sum=0; int sum2=0; int input2=0; input2=n1; int count=1; char dot=','; String Number=""; int RealNumber2=0; String All=""; String RealNumber=""; while(count<5) { System.out.println("Please enter the next number"); …

Member Avatar for Unbidden Ghost
0
168
Member Avatar for Stefano Mtangoo

Hi, I'm beginning JDBC and I'm conversant in SQL. But I need to Connect to database and that where the problem lies. All I have done is adding mysql/j connector Jar to Netbeans project and wrote code below to test. It cannot connect to database. Also IDE throws error: [CODE=JAVA] …

Member Avatar for Stefano Mtangoo
0
480
Member Avatar for daudiam

When a variable goes out of scope in Java, is it immediately removed from stack and one strong reference to the object it pointed to removed ?

Member Avatar for daudiam
0
3K
Member Avatar for leiger

I have imported the Apache XML-RPC jar files, and got them working (has taken me all day to figure out how to get it working - so I'm kind of frustrated at the moment ;D) ... but that used the execute(..) method which requires two parameters ... there was no …

Member Avatar for leiger
0
2K
Member Avatar for SerialSpiller

only 1 error. the compiler says it 'cannot find symbol' in the line of code approximately 12 rows down that reads "Payroll employee = new Payroll();". Thank You[code]import java.util.Scanner; // Needed for the Scanner class public class PayrollDemo { public static void main(String[] args) { //Declare vaiables String name; int …

Member Avatar for peter_budo
0
87
Member Avatar for Hunter2379

Hello. I want to convert a byte[] array to a string, then post it on JTextArea without having it do this: [url]http://img706.imageshack.us/img706/3342/outputc.jpg[/url] [url]http://yfrog.com/jmoutputcj[/url] [url]http://yfrog.com/5soutput2j[/url] [url]http://img208.imageshack.us/img208/7049/output2.jpg[/url] Any ideas???

Member Avatar for peter_budo
0
67
Member Avatar for abbyo

I'm having problems figuring where I need to go next in this project to create an applet from this application... any suggestions where I should start (in layman's terms)? [CODE] import javax.swing.*; public class storageSP { public static void main(String[] args) { //declare variables float res; String kfilm; String sfps; …

Member Avatar for NormR1
0
216

The End.