35,619 Topics
![]() | |
guys, i have a project that have to implement a reservation system by using java. Is it database the only way to store the data? Is there other method beside by using database? If database is the only way to do that, can anyone tell me how to do so … | |
hello can you help me i don't know how to make this method remove(Node n),in SinglyLinkedList can anyone give a hand on this.. thank you in advance.hoping for your positive responds... [CODE] public class SinglyLinkedList { private Node head; private Node tail; private int size = 0; public Node add(Node … | |
Hi all, Static Methods : static methods can access only static variables.It cannot access instance variables. static methods can call another static methods without the objects. static methods can call instance methods using the object of the class. Instance Methods: Instance methods can access static variables also instance variables. Instacne … | |
[CODE]import java.io.*; public class DCS2{ public static void main (String [] args) throws IOException{ BufferedReader myInput = new BufferedReader (new InputStreamReader(System.in)); int code, al, nmp, brc; float tf = 0 , ir = 0; String name = "" , description = ""; System.out.println ("Enter Your Barrower's Name"); name = myInput.readLine(); … | |
I am doing a payroll program that requires a sentinel value. I cant seem to get it right no matter how much I try. here is my code so far: //Filename: Payroll3.java //Description: Payroll calculator with sentinel loop //Author Name: Chris Russo //Date: 08/15/2010 import java.util.Scanner; public class Payroll3New { … | |
Hello, everyone!!! I just want to ask if you anyone here knows how to compile java file in linux specifically UBUNTU. For example, I have a java file named Hello.java and saved at my desktop. how do I compile and run this file using the terminal of ubuntu... By the … | |
hi, i was supposed to write a program in jgrasp, using java, i am a grade 12 learner, my program needs to have gui, my program compiles with no errors, when i run it it gives me my error message - "problem with showdata" - and only fills the first … | |
please me on how to insert a picture am new to netbeans [CODE]package LibraryDatabase; import static javax.swing.JOptionPane.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class PostLibraryDatabase extends JFrame implements ActionListener { JTextField firstName, surName, id, serialNumber, category, dateToday, coverTitle, isbnNumber, authoursName, coAuthoursName, pubDate, loanDate, returnedDate, email, details; JButton writeBtn, displayBtn, … | |
Hi I successfully wrote a program that keeps sending data from client to server and from server back to client where the client prints the data. But now I'm trying to write one whereby the user enter numbers at the client and they are sent to the server whereby they … | |
[CODE] coordinates1[i][0]= Double.parseDouble(text2.substring(30,38));//X coordinates1[i][1]= Double.parseDouble(text2.substring(38,46));//Y coordinates1[i][2]= Double.parseDouble(text2.substring(46,56));//Z [/CODE] How do I combine the above 3 into 1 2D array? | |
Is it possible to call a constructor if we entered know value in the output screen ??? example !! [CODE]import java.io.*; class Employee{ int num; static int count=0; float compensation; public void print(){ System.out.println ("Employee number: " + num + ", Employee Compensation: $" + compensation); } public Employee(){ num … | |
hi , i am trying to develop one jsp application with tag concept on netbeans tool. but i am getting this error "According to TLD or tagfile, Attribute uri is mandatory for tag dbquery " . i could not run my application due to this error. In Jsp file i … | |
Hi friends .. Can you help me... I have been created a new form. In this form i have multiple check boxes & i should be able to check only one check box at a time from the multiple box. The check box value contains with embedd code. when i … | |
Hi, I have a doubt in overriding the methods in java. Sample program For overriding .This program executes fine. [code] import java.io.*; import java.util.*; class one { public void show(){ System.out.println("I am in class one-Super Class"); } } class two extends one { public void show(){ super.show(); System.out.println("The subclass two"); … | |
Alright, Ive moved onto my next mission. I have to draw a set of four triangles using for loops. I have the first two done, the second two have to have spaces prior to printing the asterisks. example: ***** **** *** ** * * ** *** **** ***** This is … | |
Hi all...i'm currently trying to manipulate strings from tokens. may i know how to eliminate a char from a token without splitting it?Below is some code that i tried.How can i eliminate a certain word after the tokens are set? [CODE] package autotextsum; import java.util.*; import java.util.StringTokenizer; public class AutoTextSumm … | |
Why this code fails.... ? [CODE] String a = "abcd/dgws"; a.replaceAll("/", "\\"); [/CODE] it results in ...... Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.lang.String.charAt(String.java:558) at java.util.regex.Matcher.appendReplacement(Matcher.java:696) at java.util.regex.Matcher.replaceAll(Matcher.java:806) at java.lang.String.replaceAll(String.java:2000) | |
Assumming that program name is "XML.java", I need to perform the followings for each input file in command line--without running the code for every test file: java Xml < input1.txt java Xml < input2.txt : So My Code IS: [CODE]BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));[/CODE] [CODE]String fileName = bf.readLine();[/CODE] [CODE]File … | |
I am trying to assign variables in my array diveScore using a for-each loop. However, I don't understand why it isn't working and every element is 0.0 after the loop has ended. Eclipse is showing no errors so I am sure there is something wrong with my logic. Thanks. [code=java] … | |
I've a assignment question, A point on two dimensional plane can be represented by two numbers: an x coordinate and y coordinate. Eg (4,5). The sum of two point can be defined as a new point whose x coordinate is the sum of the x coordinates of two points similarly … | |
Hi i want to write bluetooth base app for send and recive string between two device . i have problem . i send string from device A and device B recive it but when i try to send answer from device B to A i get this notifier : [QUOTE]javax.bluetooth.BluetoothExeption: … | |
[B]what will be the query for ms access table to update a specific row? Code below is not making a valid result set resulting in exception? need help[/B]:-/ [CODE] import java.sql.*; class OdbcAccessQuery { public static void main(String [] args) { Connection con = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = … | |
Im trying to make it so that my menu options that i've highlighted are their own method but i was having issues with returning them so i could use the selection as an int for my switch statement.Any ideas? [CODE]import javax.swing.JOptionPane; public class ConversionProgram { /** * @param args */ … | |
[B]somebody please tell me why im not getting String(X) value as ID,Name,FName are being printed on console correctly but the name of ID(4) from my DB_table is not going into string(X); [/B] [CODE] package gym.resources.busyicons; import java.sql.*; class OdbcAccessQuery { public static void main(String [] args) { Connection con = … | |
This is the assignment: Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage and the user's selection from a menu of available mortgage loans: - 7 years at 5.35% - … | |
Dear All, I am new to hibernate. Please help me out in solving the following error: [Fatal Error] :5:2: The markup in the document following the root element must be well-formed. C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\nbproject\build-impl.xml:584: Deployment error: Tomcat configuration file C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\web\META-INF\context.xml seems to be broken. Please make … | |
This is the program in java which is an interface to stanford postagger. I have attached a copy of it. I am using netbeans 6.7.1 . I have placed the model file which is "left3words-wsj-0-18.tagger" in the bin folder of jdk and also placed the stanford-postagger.jar in that folder. I … | |
Hi Guys I wonder if you can help me get my head around this. I am trying to search a String for a sub string but there are not gaps in the original string for example [code] String s1 = "www.google.com/search/" String s2 = "google" [/code] when i attempt to … | |
hi friends, I am a novice java programmer. I am in a learning process in java servlets. But i struck into a Class method which should return a result set as an array. I will show my code as some one can point out where am i going wrong. Currently … | |
I want to add the created textfields to an array by default. Is there any configuration for the editor of NetBeans or I need to code it to take all separate components to an array. Thanks :) |
The End.