1,963 Posted Topics

Member Avatar for Danii

Is it because you haven't declared a constructor with 3 doubles as arguments? Or somehow your class can't "see" the constructor because you haven't import the BoneNode class?

Member Avatar for javaAddict
0
107
Member Avatar for kritersica

Contact you and say what? You are the one who is supposed to post your code and ask questions in order to get help. How are we supposed to give answers when we don't know what you want. And it is better to post you question here where everybody can …

Member Avatar for jasimp
0
112
Member Avatar for denniskhor
Member Avatar for jagan mohan
Member Avatar for sasidharnet

Probably because there isn't such constructor. [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Byte.html"]API for Byte object[/URL] [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Short.html"]API for Short object[/URL] The values in the parenthesis are not treated as byte and short but as int. I haven't try this and I don't know if it will work so don't blame me, but try: Byte b = …

Member Avatar for sasidharnet
0
155
Member Avatar for mehmedovic

I would suggest creating a class with attributes the ones you have described in your post: [CODE] Trip date (Date) Start destination (String) Ending destination (String) Mileage (double) Cost (double) [/CODE] Then create in another class methods for writing and reading files the above information taken from the classes. (The …

Member Avatar for jasimp
0
156
Member Avatar for Parsu7

Nothing is necessary. You can write anything you want in any way you want. In the end it is experience that will tell you when it is better to use servlet to handle the request from the jsp file or just just handle it in the same page by setting …

Member Avatar for Parsu7
0
105
Member Avatar for abhi287

[QUOTE=sirishag.ch;566597]Hi ABhi, Try Like this... [code=java]String hrname="("; for(int k=0;k<my_arr.length;k++) { hrname+="'"+my_arr[k]+"',"; } hrname+=")"; for(int i=0;i<my_arr.length;i++) { query = "select * from my_table where HR=(select max(HR) from my_table where FirstName not in "+hrname+")"; }[/code][/QUOTE] Sorry to break this to you but what you wrote is totally wrong and you are going …

Member Avatar for javaAddict
0
159
Member Avatar for degamer106

[CODE] public void add(CompositeShape aShape) { Rectangle temp = aShape.getBounds(); int width = (int)temp.getWidth(); int height = (int)temp.getHeight(); JButton aButton = new JButton(new ShapeIcon(aShape, width, height)); } [/CODE] The button only exists in the add method. You declare it then that's it, you are not doing anything with it. No …

Member Avatar for javaAddict
0
119
Member Avatar for katharnakh

char should have length 1. Always 1. This is correct char c=' '; or char c='2'; Not this: char c=''; or this char c='12'; So I believe that the compiler could convert the '\21' to its equivalent character but not '\29' because there isn't any. Is like writing: char c='\n'. …

Member Avatar for katharnakh
0
118
Member Avatar for hazelle

You don't ask for help, you just posted your assignment that includes a lot of different fields from java. (gui designing, button handling, reading/writing files). What is your background, what are your weaknesses, what you don't understand? No one is going to do it all for you. Start writing code …

Member Avatar for stultuske
0
107
Member Avatar for clueless101

First of all what kind of errors do you get and where? And from what I see: In calcAverage() you simply display the average, so in the main I think that you should first call the avgScore = total / 5.0; and then the calcAverage(); And second, the determineGrade() returns …

Member Avatar for stultuske
0
133
Member Avatar for majestic0110

break statement inside the loop doesn't make it an infinite loop. (that's my opinion of course) Others might have better suggestions

Member Avatar for majestic0110
0
157
Member Avatar for Littlen

I don't know these classes but from the code and the error I understand that when you are trying to do this: [CODE]ASN1Sequence asn1Sequence = (ASN1Sequence)DEROctetString;[/CODE] The DEROctetString instance, is NOT an ASN1Sequence object, so it cannot be turned into one, using casting. It is like saying something like this: …

Member Avatar for Tenk
0
282
Member Avatar for new_2_java

Then use: sdf.format(date); The SimpleDateFormat.format(Date) will take any Date object, no matter how it was created and retutn a String based on the pattern you have set at the SimpleDateFormat object. Meaning that this: [CODE] SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-mm-dd hh:mm:ss" ); Date date = new Date(); System.out.println("Date: " …

Member Avatar for new_2_java
0
131
Member Avatar for Pavan Kalyan V

Yes, your command shall be done my emperor. We have no problem doing you homework, since you asked so nicely.

Member Avatar for stultuske
0
93
Member Avatar for KimJack

When you pop, place the value in a string and compare it with the String "add": for example (not exaclty java code because i don;t remember by heart the right syntax) [CODE] String s=stack.pop(); if (s.equals("add")) { int i=Integer.parseInt( stack.pop() ); int j=Integer.parseInt( stack.pop() ); int res=i+j; stack.push( String.valueOf(res) ); …

Member Avatar for javaAddict
0
192
Member Avatar for Dio1080

#1: You don't need for loops. You have 4 different for-loops and inside each one you have the same code, without using the index i. If you look at one of them you will see that: the first time it takes for example the model and sets it to the …

Member Avatar for javaAddict
0
135
Member Avatar for madhusamala

And if you are to post this in an sql forum try to make it a little bit more readable, because I didn't understand much about what you are trying to do

Member Avatar for javaAddict
0
110
Member Avatar for kooljoycie

No one here is going to do your homework. And when your teacher tells you to write a software, he will probably give you some notes in class. If you attend the classes, pay attention to what you teacher says and study the notes you keep, you will not have …

Member Avatar for Ezzaral
0
68
Member Avatar for amitahlawat20

I copy-pasted your code and run it and it worked fine. The result I got was: 238.14 + 515 - 126.3616 result = 626.7784146484375 What was your problem?

Member Avatar for masijade
0
105
Member Avatar for codered152

That's because there isn't such a method. If you check the API Math.min takes only 2 arguments.

Member Avatar for masijade
0
79
Member Avatar for madhusamala

It should be like this: "insert into emp(total) values("+total+")" if the total column is type NUMBER in the DB or like this: "insert into emp(total) values('"+total+"')" Use System.out, before you are executing queries in order to see what is executed, so you can use it in an sql editor and …

Member Avatar for jwenting
0
124
Member Avatar for mattie5489

What are the problem specifications. How are you supposed to produce the image and post your code using tags.

Member Avatar for javaAddict
0
239
Member Avatar for pavya133

I think, masijade, that he wants to call this method:whateverMethod(Object obj) with any kind of object and for the method to do what is necessary every time dynamically. Meaning that I don't think that he intends to check what type of class he is passing in order to do casting. …

Member Avatar for masijade
0
158
Member Avatar for abhi287

Two ways: First: Use javascript: Instead of type="submit", use: <input type="button" value="Button" onclick="someMethod()"/> Inside the someMethod you can check the length of the inputs in order to see how many were given ans act accordingly: submit the form or print an error message with the alert() function. Second (Not as …

Member Avatar for javaAddict
0
93
Member Avatar for tactfulsaint

Have a table in the database where you store which options each user is allowed to perform. Then when that user logs in you can query that table to see which actions the user can perform.

Member Avatar for orko
0
117
Member Avatar for madhusamala

In the form tag you must put the url in the 'action' attribute and in the 'method' attribute you put post or get: [CODE] <form action="someurl" method="post"> ... </form> [/CODE] When you submit the form you send the information that are inside it to the given url And I would …

Member Avatar for Nilesh Pagar
0
149
Member Avatar for KimJack

From what I understood you have declared the array to contain objects, but you insert Strings. Why don't you create a class with two attributes: name and description and insert that in the array. So when you get the object from the array you will have access to each of …

Member Avatar for KimJack
0
103
Member Avatar for i_me_roo

What you see is in milliseconds. When you get the difference, multiply by 1000 and you will have how many seconds have passed

Member Avatar for Aldehyde81
0
162
Member Avatar for reddirt67

At what line do you get that Exception? And it means that you are trying to access an array with a counter that is bigger than the length. Check all your arrays and try to debug by putting system.out.println(); before you access an array by printing the counter you are …

Member Avatar for javaAddict
0
40
Member Avatar for piers

There is a better way to socialize: 3 words for you World Of Warcraft:icon_smile:

Member Avatar for neocoder
0
350
Member Avatar for nate12457

I found Java 2 Cadenhead & Lemay very useful. I have given it to others and said the best things about this book.

Member Avatar for jwenting
0
133
Member Avatar for Parsu7

You will not be obligated to write something like: [CODE] try { } catch(IOException io) { } [/CODE] in your code. Meaning that if a method throws an IOException you will not have to catch it but if it is thrown there will be no place for the exception to …

Member Avatar for Parsu7
0
132
Member Avatar for Parsu7
Member Avatar for Parsu7
0
122
Member Avatar for vladdy19

You can write whatever you want if this is the way you want to convert "asu" to a String. As it was said in the first reply what do you want to convert "asu" to?

Member Avatar for javaAddict
0
167
Member Avatar for tactfulsaint
Member Avatar for spywx2003

Where do you get your error at the following? And why do you have size as an argument since you are calculating it in the method. It won't matter what value it will have when you call the method since it will take a new value; the size of the …

Member Avatar for taineechan
0
182
Member Avatar for grhu8175

Create first the gui for login, using javax.swing. Then when you click the button you will have to read the file where the users are stored (if you know how to write into the file since you said that you are done with the registration part, you would be able …

Member Avatar for javaAddict
0
51
Member Avatar for Shveetis

That is because the variables you are using to store the values in tri() cannot be used outside that method; they are local variables and can be used only inside that method. One suggestion is to make your methods non static, and declare the variables that you will store the …

Member Avatar for Shveetis
0
140
Member Avatar for Shveetis

Use the code tags without the ' in the tag: ['Code=JAVA] //code ['/Code] Don't put the ' in the above tags

Member Avatar for javaAddict
0
84
Member Avatar for piers

The getters return null because the values first,lastName are null. If you see the constructor they never get values. The constructor: [CODE] public Name( String name) { name = FirstName + LastName; } [/CODE] is wrong. The argument's value must be inserted somwhere: [CODE] public Name( String n) { name …

Member Avatar for Parsu7
0
156
Member Avatar for mayank.aga

There is a suggestion: [CODE] File file=new File(rout); FileWriter text=new FileWriter(file); BufferedWriter out=new BufferedWriter(text); out.newLine(); out.write("a String"); [/CODE]

Member Avatar for mayank.aga
0
199
Member Avatar for pranavdv

Have you declared a package? Try running a simpler "Hello World" program, because the error you are getting doesn't have to do with the sql part. Are you getting the error when you compile or when you run?

Member Avatar for pranavdv
0
77
Member Avatar for mayank.aga

Don't wait too much, you will be disappointed. Meaning that you should post the compile errors you get for each class and then we will try to help you. Because you are not using code tags and it is hard to read your code

Member Avatar for mayank.aga
0
94
Member Avatar for sarath.koiloth

You don't need to know by heart the exact definition of OOP in order to be able to write code. Just know how to use objects correctly.

Member Avatar for jwenting
0
102
Member Avatar for Techboy52

The break; takes you out of the switch{}. Even if it did take you out of the method, which it doesn't, the method is declared int: public static [B]int [/B] getValue(char c) {} The above method has ONE char argument, and it must return an [B]int[/B] value. If you you …

Member Avatar for Techboy52
0
477
Member Avatar for Ankita B

What have you written so far, what is your problem and how good are you concerning HTML, jsp pages and DB queries

Member Avatar for stultuske
0
132
Member Avatar for leroi green

The class is called GUIEx and you have a method called LabelFrame() in which you call super(). Meaning that super(), should called only inside the constructor and LabelFrame is not a constructor since the class's name is GUIEx

Member Avatar for leroi green
0
102
Member Avatar for williamku87

Have you added the changes to your code? If you have what errors do you get know and what is your problem? Perhaps you should post you newly updated code and tell us in what you are having difficulties

Member Avatar for piers
0
125

The End.