32,199 Topics
| |
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--%> … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
[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 … | |
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. | |
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 | |
Is there an easy way to convert a simple integer into a boolean type? | |
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 … | |
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 { … | |
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 | |
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 … | |
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, … | |
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 :) | |
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 … | |
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 … | |
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(); } } … | |
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 … | |
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 … | |
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 … | |
[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"); … | |
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] … | |
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 ? | |
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 … | |
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 … | |
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??? | |
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; … |
The End.