Win a copy of Head First Android this week in the Android forum!

Mustafa Musaji

Ranch Hand
+ Follow
since May 03, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mustafa Musaji

I'm not quite sure I understand your question.

If you are asking how they work I'm afraid I don't know enough to answer that in detail.

But they basically allow you to send SMS messages just like you would through your mobile phone to another number.

If you are asking why they are used I guess there a million reasons for their use. If you have a critical threshold on a system instead of writing to a log file you raise an alert that sends the SMS to a number of admins who can prevent something from getting worse or you can have a website that takes in a customers number and texts them to keep them updated on their order etc.

http://ws.textanywhere.net/web/Home/ lets you sign up for free and give you 20 msgs for free. Just give it a try.
11 years ago
There are quite a few different SMS providers which have Java API's for you to use. I guess price etc will depend on which country you are using them from. If you Google the search I'm sure you will find plenty of examples as each provider can be different. One example is a company called TextAnywhere.
11 years ago
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%

I think you need to change suspend=n to suspend=y. This stops JBoss from starting up (I think) until you've launched your eclipse debug.
11 years ago
I think it will be rather hard for someone to tell you how to improve the way you think. The thing is, you know what the problem is, you can only practice and get better. If you find yourself taking too long to complete a task, make a decision on the way you want to go and start doing it. If it is wrong you can start again. I think you are scared of making a mistake and want to get it right first time, but there is nothing wrong in learning from mistakes.

Important thing is to make a decision and not linger too long on thinking about "what-if" and "maybe". Just do it.
12 years ago
You may also want to check out this Thread in the intermediate forum

https://coderanch.com/t/425542/Java-General-intermediate/Date-validation
12 years ago
I'm not sure if I completely understand how you want to check the date, but you can use SimpleDateFormat to create the format of the date and then parse a date object using the formatter created. Check out the API for SimpleDateFormat or google "date format using Java". You'll find some good examples.

EDIT: Exactly how Sunil has said above! lol, beat me to it!
12 years ago
What he is saying is if you create an instance of Test it will always be referenced by the list and therefore never be garbage collected even if where you created the instance is not referencing that object anymore.



Hope that clears things up.
12 years ago
Just like if you were launching it using command line. You most probably need to include any libs your program uses and the main entry point for the program.

java -cp [libs] [package] [arguments]
12 years ago
If you are keeping the number of bytes you have read, if a new file is created, the size of this file will be smaller than the number of bytes you have already read (correct?) so you will know you are reading a new file?

The other way you could go about it is at the time your program is creates the new file, then you know the next read you do from the file should start from 0 so use a flag to switch from reading from already saved location or from start of file.
12 years ago
I was bored....

What you need to do is create two comparators using implements Comparator. This will force you to implement the method compare(Object one, Object two). This returns an int.

In your main class, when you have your array of objects you want to sort in a particular order you can do Arrays.sort(your array, new ComparatorName);

If you do a search for Java Comparator Example in Google you'll get exactly what you're after, but I hope this helps either way.
Hi Duran, I would strongly recommend taking Punits advice. I took SCJP5 in the summer and passed. Whilst studying I must have written well over 60-70 classes all organised in to package subjects just like Punit. I read the book twice properly and a third time as a reference. Then I started playing around with the code I had written. As I went along I made comments in the code when I realised how something worked. Breaking it, trying to fix etc.

Reading the book will give you a very small amount of the knowledge you need. Writing small code samples and tinkering with it yourself will give you more and then doing mock exams will give you the rest.

Mocks will give you give ideas of what to experiment with in the code that you have written. It is tedious sometimes, but its all practice. Even if you think you know how to write FileReaders, do it again to make sure.
You have to do ALOT of coding. That would be my advice from what you've said. I dont think you can pass this exam by just revising the book.

As for examples, think of a simple program to make. As an example, when I was a practicing and couldn't understand equals and hashmaps and generics, I created a telephone directory program. You have to do lots of coding for each chapter in K&B.

Originally posted by Ulf Dittmer:

Not quite. Bob is right in saying that you can't progress beyond a certain point without contribution points. That point is reached when you have the Green Belt.



I didn't realise that. But even then, up to Green is probably enough for someone who is revising for SCJP.
I used Java Black Belt, and they have some decent SCJP mocks there as well.

I think you'll be glad to know that they've got rid of their old progression style and now you can progress without them points, BUT only a specific order of exams. It's a good site and gives plenty to learn from.