3,927 Posted Topics

Member Avatar for new_2_java

I think the null pointer exception is occurring from the printStream.println() call, rather than the exec() call. You haven't initialized "printStream", so when the error from that exec() command is thrown (which is that "cls" is not a program, by the way), the catch statement is throwing the exception out …

Member Avatar for new_2_java
0
274
Member Avatar for KimJack

You aren't very clear in what it is that you are wanting to do. What is the point of using a linked list in one class to access an array of objects in another? You'll need to post a bit more information.

Member Avatar for ~s.o.s~
0
99
Member Avatar for Shveetis

If you don't even have any idea how to start, you don't really have a project. You have a name of a project. If you don't have any idea what you want to accomplish, how do you expect anyone to help you accomplish it? It sounds like you need to …

Member Avatar for Ezzaral
0
86
Member Avatar for Questions???

You actually do not need classes for the input at all, as they are just making a single call to show your input dialog. A class isn't needed to wrap a single function call. You can put a small helper method in your Calculate class which handles the input part …

Member Avatar for ~s.o.s~
0
99
Member Avatar for fufu123
Member Avatar for fufu123
0
176
Member Avatar for Webbsta

No, it is not possible. Main() is the only method that can be run with the "java myClass" call from the OS.

Member Avatar for Webbsta
0
113
Member Avatar for ashkash

See the following example on comparing dates: [url]http://exampledepot.com/egs/java.util/CompDates.html?l=rel[/url] and you can find a lot of information on using the date-related API classes here: [url]http://mindprod.com/jgloss/calendar.html[/url]

Member Avatar for Ezzaral
0
105
Member Avatar for eleonora
Member Avatar for Ezzaral
0
87
Member Avatar for nathanpacker

Here are a couple of tutorials: [url]http://blogoscoped.com/archive/2004_06_23_index.html[/url] [url]http://www.devnewz.com/devnewz-3-20041221UsingPHPCURLLibrarytoScrapetheInternet.html[/url] It's just a matter of obtaing the HTML from a request and parsing out the data you need.

Member Avatar for ha1e
0
158
Member Avatar for Agni

[QUOTE=chandra.rajat;522628]sounds good .... or how bout 'a junior poster in training' actually gets access to some training material from the site.. or he's assigned an expert as a buddy who he can go to once in a while for help :)[/QUOTE] The site [U]is[/U] the training material. And since the …

Member Avatar for Ezzaral
0
112
Member Avatar for new_2_java

Looks mostly fine to me. Do you have any package statements in that class file?

Member Avatar for majestic0110
0
117
Member Avatar for shankarjadhav

Well, that is about the longest way around the problem if you simply want to know the java version from within a program. All you need is[code=java]System.getProperty("java.version");[/code] There is a lot of other info available as well[code=java] for (java.util.Map.Entry s : System.getProperties().entrySet()) System.out.println(s.getKey()+": "+s.getValue());[/code] But all that is completely irrelevant …

Member Avatar for Ezzaral
0
529
Member Avatar for jessxe02

[QUOTE=jessxe02;523194]plss give me some basic example of sorting with user input!!!! thx[/QUOTE] Sorry, we are here to help with code that people are having trouble with - not provide example code on demand. Post your efforts and specific questions about the trouble you are having. If you haven't made any …

Member Avatar for Ezzaral
0
75
Member Avatar for ashkash

You can accomplish it quite easily with either regex (see [URL="http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html"]Pattern[/URL] and [URL="http://java.sun.com/javase/6/docs/api/java/util/regex/Matcher.html"]Matcher[/URL]) or with a simple String.split(",") to separate the pair. For the date part you can use [URL="http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html"]SimpleDateFormat[/URL] if you need to parse to a date value from the string.

Member Avatar for javaAddict
0
116
Member Avatar for piers

[CODE] public class Card { [B]getSuit(); // These are invalid calls - you cannot do this here getRank();[/B] [B]// you have not declared rank and suit member variables // you can have a static array for the rank values here and initialize it with // a static block.[/B] publlic Card(int …

Member Avatar for Ezzaral
0
145
Member Avatar for new_2_java

Why do you need to run the OS command instead of using File.delete()?

Member Avatar for new_2_java
0
126
Member Avatar for new_2_java

Well, you are showing two different file names there, so that might be a problem. If you are having difficulties with specifying a relative file path, make sure that path resolves correctly against the current user directory, which can by checked with System.getProperty("user.dir").

Member Avatar for new_2_java
0
152
Member Avatar for babyfrostie

I don't know, but I would imagine the homework assignment entails whether [U]you[/U] can prove it.

Member Avatar for babyfrostie
0
82
Member Avatar for Anupkumar
Member Avatar for fufu123

Also, your calculation isn't keeping track of the remainder after the higher coins have been returned. If you have 0.70 in change, your current calcs would show 2 quarters, 7 dimes, 14 nickels, etc. I think you want to display 2 quarters, 2 dimes as the result.

Member Avatar for Ezzaral
0
236
Member Avatar for csc385

And what exactly is your question? You don't expect anyone to just answer the homework problem for you, do you?

Member Avatar for Ezzaral
0
57
Member Avatar for lostandfound
Member Avatar for fatjoy25
Member Avatar for shaikh_mshariq

[QUOTE=shaikh_mshariq;512897]Please read Details carefully before your suggestion.[/QUOTE] Your post does sound like you want to create it in c++. Don't berate others for your own failure to write something clearly.

Member Avatar for shaikh_mshariq
0
630
Member Avatar for baheddad
Member Avatar for baheddad
0
147
Member Avatar for The Dude

[QUOTE=jaepi;506392]Kill Michael Jordan and see what will happen to the Chicago Bulls without him.[/QUOTE] I think you need some therapy.

Member Avatar for Thomas R
0
299
Member Avatar for xoron123

This is a class path problem. The class path let's Java know where to locate classes for your file. Post the command that you are using to run the program and a bit of directory information on where that class file resides.

Member Avatar for xoron123
0
137
Member Avatar for KimJack

You may also want to consider using the Scanner class with regular expressions. And once again I'll request: [U]Please use [ code ] tags to format code in your posts so indentation is preserved.[/U]

Member Avatar for KimJack
0
200
Member Avatar for nljavaingineur

You cannot declare a method within a method like that, which is what this line is trying to do[code]public void actionPerformed_Plus()[/code]

Member Avatar for electron33
0
145
Member Avatar for new_2_java

If you are using Java 1.6, the Console class provides a mechanism for this: [url]http://java.sun.com/docs/books/tutorial/essential/io/cl.html[/url]

Member Avatar for new_2_java
0
163
Member Avatar for ahmad usama

Sorry, this is not a code warehouse for you. Also, see the forum rules regarding "text speak" : [url]http://www.daniweb.com/forums/faq.php?faq=daniweb_policies#faq_keep_it_clean[/url]

Member Avatar for jwenting
0
280
Member Avatar for Acidburn

Well, if the Runnable has a method which Class A can call when appropriate, it can simply sleep while monitoring for whatever state Class A is expected to set. For some general info, this article on thread messaging may be useful: [url]http://www.informit.com/articles/article.aspx?p=167821&rll=1[/url]

Member Avatar for Ezzaral
0
85
Member Avatar for kennik

Opening SSL socket: [url]http://www.exampledepot.com/egs/javax.net.ssl/Client.html?l=rel[/url] XML (see Chapter 2): [url]http://java.sun.com/j2ee/1.4/docs/tutorial/doc/[/url] Writing to file: [url]http://www.exampledepot.com/egs/java.io/WriteToFile.html[/url]

Member Avatar for kennik
0
92
Member Avatar for swanxst
Member Avatar for Ezzaral
0
2K
Member Avatar for nljavaingineur

Because your method signature takes a single parameter "ActionEvent e" and you are trying to call it with no parameters. There is no method signature [icode]actionPerformed_Plus()[/icode] defined.

Member Avatar for nljavaingineur
0
99
Member Avatar for Adami

Obviously the point of your homework is for YOU to come up with a solution. Handing you the solution defeats the purpose. Post your code and describe what troubles you are having if you would like assistance.

Member Avatar for iamthwee
0
95
Member Avatar for KimJack

The problem is that here[code]if(itemCount == item.length) Doll [] temp = new Doll[item.length * 2];[/code]you are just declaring a variable - not performing any useful operation. That variable will go out of scope immediately after it's declaration. I think what you actually want is this block[code]private void cpyArray() { if(itemCount …

Member Avatar for bugmenot
0
2K
Member Avatar for ad_ms
Member Avatar for cjturner
0
162
Member Avatar for lasher511

[QUOTE=sneekula;508638]Nationally, a vaginal delivery cost $7,737, with C-sections averaging about $11,000.[/QUOTE] Well, that first one will certainly be quite a shock when you answer the doorbell :-O

Member Avatar for sneekula
0
276
Member Avatar for Acidburn

Well, which one has no context without the other? Does a listener have any useful function without a GUI? What about the GUI? It seems to me the GUI can exist without a listener, but it just won't do much until it has one. So you could create the GUI …

Member Avatar for Ezzaral
0
85
Member Avatar for shil_284

No, it's not a warning - it's an error. Apparently they removed the compareTo(Object) signature from the String API. You could either cast the elementAt() to String or explicitly call toString() on it.

Member Avatar for jwenting
0
92
Member Avatar for 14fg

Post the code that you have and what problems you are encountering. Please put [ code] tags around any code you post.

Member Avatar for Ezzaral
0
126
Member Avatar for Acidburn

Yes, the idiom that masijade mentioned is one way to handle it. It's recommended that the boolean flag be declared volatile (i.e. [ICODE]volatile boolean canceled=false;[/ICODE]). Another way is use thread interruption. Here's a pretty good article on that: [url]http://www.ibm.com/developerworks/java/library/j-jtp05236.html[/url]

Member Avatar for Ezzaral
0
83
Member Avatar for hemanthjava

Well, that selection call should work. Are you certain the TreePath includes all nodes up to and including the one you want to select?

Member Avatar for hemanthjava
0
117
Member Avatar for sivaslieko++

If your class implements the ListModel interface (which it does if you extend AbstractListModel), why not use the constructor [url=http://java.sun.com/javase/6/docs/api/javax/swing/JList.html#JList(javax.swing.ListModel)]JList(ListModel dataModel)[/url]? Edit: Nevermind, you posted the code while I was composing this.

Member Avatar for Ezzaral
0
201
Member Avatar for Spartan552

The number of elements in the ArrayList has nothing to do with the [I]type[/I] of those elements. You only need to specify the type. If need to type the contained ArrayLists but those can contain any type you can use [icode]<ArrayList<ArrayList<?>>[/icode], but if you are using mixed-type collections you might …

Member Avatar for Ezzaral
0
417
Member Avatar for nljavaingineur

You must be using a JDK prior to 1.5, because 1.5 and 1.6 will allow you to pass that Double in place of a double parameter (autoboxing). You can use Double.parseDouble(String) to convert direct from a String to a double primitive value without the need to first create a Double. …

Member Avatar for Ezzaral
0
102
Member Avatar for Ezzaral
Member Avatar for reiyn17

[QUOTE=reiyn17;510673]can you make a program for it? pls....badly needed,, im still not familiar with java.. can you help me?[/QUOTE] And obviously the whole point of the assignment is for you to [I]get[/I] familiar with Java - so make an effort.

Member Avatar for lovely12
0
288
Member Avatar for zandiago

[QUOTE=Serunson;507215]Which no one knows when it will end....[/QUOTE] It can't end until those waging it decide to end it, as the definition of terrorism is subjective and malleable, rooted in ideology. Any violent act with which they disagree can be deemed "terrorism" and thus targeted. Violent actions which they find …

Member Avatar for Ene Uran
0
206

The End.