Muzafar Ali

Ranch Hand
+ Follow
since Jun 11, 2009
Merit badge: grant badges
For More
Pk
http://www.geocities.com/kimmuzafar
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 Muzafar Ali

Thanks,

In program i can but when combining whole the program i can't !
14 years ago
Thanks for your reply sir,
A prime number is a number which is self devisble, mean a number that cannot be devide with other numbers!
am i correct sir?
14 years ago
write a program to generate 100 int numbers, strore in array, then display all those numbers which are prime numbers?

but how i can print prime numbers from 1 to 100 but this whole question confused me?
14 years ago
Hello,
I am using ++ operator for recording wrong entries by user in else but it is not working, it is not recording user mistakes why?
here is the program

14 years ago

Maneesh Godbole wrote:Core Java by Horstmann and Cornell
Also check out Sun's swing tutorial



Thanks
Core Java by Horstmann and Cornell what version of java Swing it covers?
14 years ago
Hello every one i want to start learning swing i am currently using java 1.6 so can any one suggest me a good basic swing book by which i can cover the swing with best way.


Regards,
Muzafar
14 years ago

Eduardo Bueno wrote:Sorry but we are NotACodeMill. If you really did that code, you could easily do what you want just by looking at Scanner and String documentations.


I know sir you are not a code mil,
i don't say that correct it as i say, i say that provide me sample which could work like that i shall study on that and after that i shall use that code in my program, you say that use Scanner and String documentation i will follow that now i shall study on those .

Thanks,
Muzafar
14 years ago
Hello,
I am building a 4 functions calculator program, it is accepting a number then at next line an Arithmetic Operator then at another line another number then show calculation on only single operator.
i need help to modify it to accept data like this
12 + 12 - 2 * 2 = 20 as wel or
100 / 2 + 200 = 250 i mean it have to perform calculation from all four operators on single line or two or three

here is a program which is getting input like this
12
+
12
24
that i don't want.


i shall wait for you answers !
if you have an example code for this pupose send me i will study from that.

regards,
Muzafar
14 years ago

Campbell Ritchie wrote:It does nobody any good to have a direct alteration to their code; they don't learn anything like that.

When you read the API documentation, what did you not understand? Then we can explain it for you.



Sorry sir i will Learn from documentation myself .

Thanks,
Muzafar
14 years ago

Campbell Ritchie wrote:Please read the documentation for Scanner, find out what a "delimiter" is, what it uses as default delimiter, and also find out what happens when you push the enter key.
You may occasionally have to call the Scanner#next() method and discard the next token so as to keep your input Scanner and keyboard in step with each other.


Thank you sir,
Sorry but can you modify my program and use delimiter in it ??

Thanks,
Muzafar
14 years ago

Fred Hamilton wrote:In addition to having the method throw the exception as you have done here, you should also learn about the try/catch method of handling exceptions.

Anyways, in this case it's all about how the program is supposed to react if the filename you specify in the program doesn't actually exist. You have to tell the program how to react to that situation.

probably you would benefit from some study of the concept of exception handling in java, you will encounter it a lot.

The Java Tutorial does a pretty good job, but there's plenty of other sources too.

http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html


Yep you are right,
I will study on them,
Another question,
Look at this program.


Out put is

ENTER ROLL NO 1: 12
ENTER NAME1: ENTER NAME2: myName
NAME 1 IS:
NAME 2 IS: myName

any idea why it is behaving like that, i mean why it combines two statements together and is getting only one input!
(ENTER NAME1: ENTER NAME2:) instead of this it has to show like this
ENTER NAME1:name1
ENTER NAME2:name2

if i am writing statement like this it works but not exceptiong spaces
name1=input.next();
name2=input.next();

is it possible to accept spaces and get inputs?
14 years ago
Hey,

I solved it myself.
One question when i Declared all the methods simple Without using Throws Exception it shows me error but when i used Throws Exception along with method then it works but why ? can any one explain it for me?



Thanks,
Muzafar
14 years ago
Hey guys,
i am using File class with PrintWriter class,
when i declare File class object it works wel but when i am creating the PrintWriter class object it show me error message (UnHandled Exception Type FileNotFoundException) what should i do here is the program please correct it and give me working version.

Thanks,
Muzafar
14 years ago

Jon Kho wrote:

do use "www.google.com" or any other search engines because it has many examples on array list..



Thanks for your answer,
i will try to find those by using search engine thanks for help friends.
14 years ago

Michael Angstadt wrote:

Muzafar Ali wrote:how to get input from scanner to set values in Array;
then retrieve them.


Use java.util.ArrayList. It's like an array, but it doesn't have a fixed size, so you can add as many Strings to it as you want


Thanks fo reply,
can you post a sample for that?
14 years ago