473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

valueOf function of enum

77
Expand|Select|Wrap|Line Numbers
  1. enum birds
  2. {
  3.  parrot,cock,hen,sparrow
  4. }
  5. class demo
  6. {
  7.  public static void main(String b[])
  8.  {
  9.     System.out.println(birds.valueOf("parrot")); 
  10.     System.out.println(birds.parrot);
  11.  }
  12. }
Output is:
parrot
parrot.. i cant find any use of valueOf function of enum..Does someone know any practical use of this method?
Jan 31 '10 #1
0 1442

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Paul Schneider | last post by:
Hi, I am getting compiler errors with the following setup: template<size_t N, enum one, enum two, enum three> class Myclass { double fun(); }; template<size_t N, enum one, enum two, enum...
11
by: gao_bolin | last post by:
I am facing the following scenario: I have a class 'A', that implements some concept C -- but we know this, not because A inherits from a virtual class 'C', but only because a trait tell us so: ...
2
by: laurenq uantrell | last post by:
I have been using the following function to test the speed of various functions, however, quite often the return value is zero. I'm hoping someone can help improve on this. Function TimeIt() As...
3
by: Claire | last post by:
I have a large record with many enumerated fields. The record is stored in a file and the fields have to be extracted. I validate the data as it's read, but there's so many tests similar to the...
5
by: Schorschi | last post by:
' VOID FormatEx( ' PWCHAR DriveRoot, ' DWORD MediaFlag, ' PWCHAR FSType, ' PWCHAR Label, ' BOOL QuickFormat, ' ...
6
by: hharry | last post by:
Hello All, Is it possible to force a function argument to fall with a range of values ? For example: I have a function which searches a database table and accepts a query type argument...
10
by: banleong | last post by:
To all gurus, I am currently converting some of C++ codes to VB.net The C++ Codes is as follows : ================= C++ CODE ================== typedef struct _tagBBCameraParameter {...
5
by: Angus | last post by:
Hello I have an enum in a class like this: enum MessageType { GET, //get message (get SAF sequence no.) RESET, //reset sequence no. UNKNOWN //unrecognised...
2
by: florian.loitsch | last post by:
hi, I'm having troubles understanding the meaning of the "valueOf" method, as described in the ECMA-262 (3rd Edition) standard. I quote (section 15.2.4.4, page 85): === "The _valueOf_ method...
15
by: Ketchup | last post by:
Hello everyone, I have been stuck with this problem for quite some time now. I am working in VB.NET, using framework 1.0. I have to keep the compatibility down to the original .NET framework...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.