JAVA program to check please answer
-
Simple Java program to check whether input value is numeric or alphabet. If alphabet check whether its Capital or or lowwer case. If digit throw user defined exception " Digit not allowed."
-
Simple Java program to check whether input value is numeric or alphabet. If alphabet check whether its Capital or or lowwer case. If digit throw user defined exception " Digit not allowed."
Yes, that is simple. So much so it would be insulting if we offered any help you did not ask for. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
Yes, that is simple. So much so it would be insulting if we offered any help you did not ask for. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
vivek886 wrote:
Simple
Yep. So, what did you try?
CQ de W5ALT
Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software
Actually i was asking the question Q. Write a simple Java program to check whether input value is numeric or alphabet. If alphabet check whether its Capital or or lowwer case. If digit throw user defined exception " Digit not allowed." Actually m new this forum and New to java. Can you please tell me the solution. will be thank full to you. Can this program be written in command line form? Means if we run it from a command prompt. or in AWT only.? Sorry if any mistake from my side.
-
vivek886 wrote:
Simple
Do you mean that you could code this with your eyes closed, or you are throwing down a challenge to the rest of us?
Just say 'NO' to evaluated arguments for diadic functions! Ash
Actually i was asking the question Q. Write a simple Java program to check whether input value is numeric or alphabet. If alphabet check whether its Capital or or lowwer case. If digit throw user defined exception " Digit not allowed." Actually m new this forum and New to java. Can you please tell me the solution. will be thank full to you. Can this program be written in command line form? Means if we run it from a command prompt. or in AWT only.?
-
Actually i was asking the question Q. Write a simple Java program to check whether input value is numeric or alphabet. If alphabet check whether its Capital or or lowwer case. If digit throw user defined exception " Digit not allowed." Actually m new this forum and New to java. Can you please tell me the solution. will be thank full to you. Can this program be written in command line form? Means if we run it from a command prompt. or in AWT only.?
vivek886 wrote:
Can you please tell me the solution.
Unfortunately no, you need to work it out for yourself. If you are new to Java then I suggest you spend time working through these tutorials[^]. There is a high probability that you will find the answer quite easily.
Just say 'NO' to evaluated arguments for diadic functions! Ash
-
I mean to say that m asking for the solution as m new to java. and m sorry the way i asked question . Actually the question is write simple program.
If you haven't guessed, no one will write your code, but we'll help you make it right.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
vivek886 wrote:
Can you please tell me the solution.
Unfortunately no, you need to work it out for yourself. If you are new to Java then I suggest you spend time working through these tutorials[^]. There is a high probability that you will find the answer quite easily.
Just say 'NO' to evaluated arguments for diadic functions! Ash
-
OK, that's much better. This is a question we are willing to answer. If alphabet check whether its Capital or or lowwer case check this: java.lang.String @ oracle.com and - as you want to find capital letters check this ASCII-Table the "HTML" and the "chr" columns are quite interesting when combined with java.lang.Character @ oracle.com If digit throw user defined exception " Digit not allowed." check this: Try Catch Tutorial @ oracle.com and find a way to convert a String into a java.lang.Integer @ oracle.com ;) regards Torsten
I never finish anyth...
-
vivek886 wrote:
Can you please tell me the solution.
Unfortunately no, you need to work it out for yourself. If you are new to Java then I suggest you spend time working through these tutorials[^]. There is a high probability that you will find the answer quite easily.
Just say 'NO' to evaluated arguments for diadic functions! Ash
-
is this program right to check whether string is alpha or numeric public boolean isIntNumber(String num){ try{ Integer.parseInt(num); } catch (NumberFormatException nfe) { return false; } return true; }
-
is this program right to check whether string is alpha or numeric public boolean isIntNumber(String num){ try{ Integer.parseInt(num); } catch (NumberFormatException nfe) { return false; } return true; }
-
is this program right to check whether string is alpha or numeric public boolean isIntNumber(String num){ try{ Integer.parseInt(num); } catch (NumberFormatException nfe) { return false; } return true; }
vivek886 wrote:
is this program right to check whether string is alpha or numeric
Technically, yes, but using exceptions in such a fashion could be costly.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius