32,199 Topics

Member Avatar for
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
161
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
173
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
243
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 mahdi68

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

0
97
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
120
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
103
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
403
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
642
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
53
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
Member Avatar for raephel
Member Avatar for boiishuvo

I am a new learner of Java. Thq question is "Write a Java program ShowStars.java so that java ShowStars numA1 numB1 .... display a sequence of stars "*", starting from position numA1 and ending at position numB1. If there are further such integer pairs, say, numA2 and numB2, do the …

Member Avatar for javaAddict
0
182
Member Avatar for Megha SR

guys........ can anybody help me in FUNCTRIONS?? i'm not able to understand it. can u show me examples also???????? pls:icon_confused: :cool: pls reply............. thankyou.........:?:

Member Avatar for JamesCherrill
0
93
Member Avatar for madhub2v

i want to know that.. i hava a small java program i.e to caliculate electricity bill(home or commercial). i have compiled and executed it. so now i want to turn this program to a appilcation like caliculator. How?.

Member Avatar for Stefano Mtangoo
0
149
Member Avatar for hmarie88

I keep getting these errors when I try to run the program Exception in thread "main" java.lang.NumberFormatException: For input string: "GTR" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at Inventory6.addProductToInventory2(Inventory6.java:549) at Inventory6.main(Inventory6.java:734) I've spent hours trying to figure out what I'm doing wrong and it's due in a few hours. I …

Member Avatar for hmarie88
0
109
Member Avatar for toferdagofer

im trying to figure out how to get the max and min of the values that are entered if i run this program. I want the user to enter in a series of numbers until they were finished and to terminate it to type -99. I'm having quite a few …

Member Avatar for toferdagofer
0
201
Member Avatar for bunifrog

I already have a Please Press Enter to continue... Statement for the end of my list that will allow the list to stay on the screen, be read, then when the user is ready they hit enter and the list continues to the next page. That is part of the …

Member Avatar for bunifrog
0
186
Member Avatar for Xufyan

See the code below, [CODE]import java.io.*; class Test1 { public static void main (String arge[]) throws IOException { InputStreamReader values = new InputStreamReader (System.in); BufferedReader br = new BufferedReader (values); String value,store; char ch; System.out.print ("Input String: "); value = br.readLine(); store = ''; int ln = value.length(); for (int …

Member Avatar for Xufyan
0
258
Member Avatar for tallmen2

how do i store a .bmp image or a .jpg image in a table in MS Access database?

0
25
Member Avatar for jk_bscomp

Hello everybody!!! Can someone help me on how to create an executable file on java? I made some applications in java but my problem is, I need to compile my program everytime I want them to run ... What I want is to compile my program once and then just …

Member Avatar for nickguletskii
0
162

The End.