31,001 Topics

Member Avatar for
Member Avatar for palak12

Hi everyone, I will be really thankful if someone could help me out. I am developing a gui application ( based on java jdbc and oracle10g), where a user can enter queries retrieve data from that can perform selection projection join union. Till now I could perform only selection queries …

Member Avatar for java_programmer
0
106
Member Avatar for NewOrder

the few things that i cant understand are inside the code.. The code should give out the car type, model type ,serial number. and the number of cars.. [CODE]public class part5{ public static void main(String[] args) { System.out.println(Car.getCounter()); Car[] cars =new Car[5]; for (int i = 0; i < cars.length; …

Member Avatar for NewOrder
0
224
Member Avatar for junichiro90

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 …

Member Avatar for JamesCherrill
0
120
Member Avatar for jemz

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 …

Member Avatar for jemz
0
187
Member Avatar for prem2

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 …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for ueoptimum

[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(); …

Member Avatar for javaAddict
0
124
Member Avatar for capsitan

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 { …

Member Avatar for tong1
0
157
Member Avatar for jk_bscomp

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 …

Member Avatar for tong1
0
350
Member Avatar for playdaguigame

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 …

Member Avatar for javaAddict
0
99
Member Avatar for herberwz

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, …

Member Avatar for herberwz
0
155
Member Avatar for DARK_BYTE

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 …

Member Avatar for JamesCherrill
0
100
Member Avatar for hazeeel

[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?

Member Avatar for javaAddict
0
28
Member Avatar for Xufyan

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 …

Member Avatar for group256
0
193
Member Avatar for rajasekhar1242

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 …

Member Avatar for rajasekhar1242
0
149
Member Avatar for prem2

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"); …

Member Avatar for tong1
0
99
Member Avatar for NewbyChic

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 …

Member Avatar for javaAddict
0
171
Member Avatar for keanoppy

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 …

Member Avatar for keanoppy
0
229
Member Avatar for sawant_nitesh

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)

Member Avatar for sawant_nitesh
0
310
Member Avatar for tedtdu

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 …

Member Avatar for tedtdu
0
130
Member Avatar for Garee

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] …

Member Avatar for jon.kiparsky
0
112
Member Avatar for Xufyan

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 …

Member Avatar for Xufyan
0
120
Member Avatar for warbird43

[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 = …

Member Avatar for Ezzaral
0
119
Member Avatar for toferdagofer

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 */ …

Member Avatar for toferdagofer
0
137
Member Avatar for warbird43

[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 = …

Member Avatar for warbird43
0
102
Member Avatar for merlin1106

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% - …

Member Avatar for jon.kiparsky
0
398
Member Avatar for Nitu Khanna

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 …

Member Avatar for JamesCherrill
0
640
Member Avatar for ahsan1

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 …

0
52
Member Avatar for steveh000

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 …

Member Avatar for steveh000
0
111
Member Avatar for erogol

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 :)

0
61
Member Avatar for prem2

Hi , I am having a hashtable which consists of some keys and values.I can able to get the information from the hashtable using iterator or Enumeration. [code] import java.util.*; import java.util.Hashtable.*; import java.util.Iterator.*; import java.util.Enumeration.*; import java.io.*; class ex_hashtable { public static void main(String args[])throws IOException{ Hashtable<Integer,String> hobj=new Hashtable<Integer,String>(); …

Member Avatar for prem2
0
134

The End.