13.07.2015 Views

R-evolution - Reliance Communications

R-evolution - Reliance Communications

R-evolution - Reliance Communications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Reliance</strong> Developer Programme | July 2007Newsletter for developer communityFor private circulation onlyEditorialDear DevelopersWe live in interesting times. The mobile has r<strong>evolution</strong>ized how people communicate and shareinformation. From an ordinary communication device it’s metamorphosis into a more powerfulgadget for accessing a variety of information and entertainment content on the move is trulyamazing! Voice Applications have greatly facilitated access to information, marketing,entertainment content as well as transaction execution. Datamonitor estimates that global voicebusiness will grow to more than $ 2 Billion by 2007, a clear indication of the growth incommercial and consumer confidence related to this technology.The lead article “ Building Enhanced Services through enhanced Standards “ throws light on whatconstitutes enhanced services, changes in the last few years for development and deployment ofapplications in the enterprise and are now becoming accepted in the service provider environment.The Technical Article focuses on understanding and creating VoiceXML applications.In the Tech Tip Part 1 we highlight “ Best practices to improve performance in servlets.”In the interview of the month Mr Sandeep Ganguly – Onmobile’s Sales and Marketing Head shareswith us the product innovations that Onmobile has brought in the VAS ( Value Added Services)domain in partnership with <strong>Reliance</strong> <strong>Communications</strong>.We look forward to receiving your feedback and valuable suggestions.Warm regards,Chanda Mahajan<strong>Reliance</strong> Developer Programme TeamLead articleBuilding Enhanced Serviceswith Open StandardsTechnical articleVoiceXMLTechnical tipBest practices to improveperformance in ServletsInterview ofthe MonthSandeep GangulyMonthly Quiz& Poser


Building Enhanced Services with Open StandardsLead articleOverviewWith the widespread acceptance of open standards atboth the network and application levels, the model fordeploying service provider enhanced services haschanged. This article touches on a few of the relevantstandards, provides food for thought around the kinds ofapplications that can be deployed, and describes thebenefits that can be realized through the use ofstandards based technologies.What Are Enhanced Services?In our daily use of the most ubiquitous communicationsdevice on the planet – the telephone – we interact withso-called Enhanced Services on a routine basis.Enhanced Services include network features that rangefrom simple to complex. Some examples include:VoicemailDirectory AssistancePrepaid calling card processing“Color” ringbackConferencing ServicesThese services have historically been provided byproprietary hardware platforms, often dedicated to aparticular function. This meant that the service providerneeded different platforms for each of voicemail,conferencing, and so on. These platforms were veryreliable, and performed their functions well – but eachrequired their own form of management, applicationupdates could be challenging, and might even require theuse of highly specialized professional services that wereonly available from the original vendor – if applicationscould be changed at all.What Has Changed?Over the past few years, a number of standards from theInternet Engineering Task Force (IETF – www.ietf.org) andthe World Wide Web Consortium (W3C – www.w3c.org)have become widely accepted for the development anddeployment of applications in the enterprise and are nowbecoming accepted in the service provider environment.On the ‘plumbing’ side, protocols like the SessionInitiation Protocol (SIP -http://www.ietf.org/rfc/rfc3261.txt?number=3261) canprovide the foundation for many different kinds ofinteractions, including telephone calls, instant messaging,and video interaction. SIP is important because itprovides a standard way for different network andendpoint devices to interact, and the basis for buildingmuch more complex services. In particular,interoperability between different devices is more easilyproven and understood that traditional telephonytechnologies.SIP enables the infrastructure to work – but we still needto build applications. This is an area that is rapidlyevolving, but some of the most interesting standards inthis area include VoiceXML and CCXML. VoiceXML is amarkup language that allows the management of dialogswith a caller. VoiceXML manages resources like speechrecognition and speech synthesis, while allowingtwo-way interaction with the caller. There is a family ofrelated W3C specifications that cover relatedtechnologies, and allow development of very rich,portable applications.VoiceXML provides a way to interact with the caller – butit provides very little in the way of control over the callitself. This is where Call Control XML (CCXML) comesinto play. CCXML provides a markup language thatallows for granular processing of the signaling around acall. CCXML provides control over dialogs (implementedwith, for example, VoiceXML) conferences andconnections to callers and other endpoints (liketelephones, instant messaging clients, and so on).The hardware advances tied to Moore’s law have alsobeen important. Rapid advances in commodity hardwarehave allowed similar advances in the ability of softwaresolutions to meet advanced application needs. Servervendors also provide commodity hardware in form factors– including hardened platforms and blade-basedconfigurations – that are very attractive to serviceproviders for cost and maintenance reasons.Real-World ApplicationsWhat kind of applications can be built using thesetechnologies? The great thing about the combinationof standards such as these, and commodity hardware, isthat they act as true enablers, allowing the applicationvisionary to realize opportunities that simply could not beachieved using less flexible technologies. Let’s look at anexample – conferencing.We have all used teleconference ‘bridges’, where we call afree-phone/toll-free number, are prompted for aconference identifier, and perhaps a password or PIN.After listening to ‘music on hold’, the conference hoststarts the conference, and we are all joined to aconference, where we try to accomplish something.Conferencing platforms are typically dedicated resources,with relatively fixed applications that control theconference. The host has some level of control over theconference.Now, imagine having the ability to develop thisapplication using web-based technologies like VoiceXMLand CCXML. This will give you the ability to rapidlydevelop, test, and deploy changes to the conferencingapplication itself. If we were to make use of CCXML foroverall control of the application, and VoiceXML for anywww.dadp.com prev nextpage 2


VoiceXMLTechnical articleVoice-based products are becoming pervasive in the service industry today. Companiesare realizing the benefits of using these products to save money and serve customersfaster. Let us take a look at what it takes to make such an application.We have tried to give you a broad overview of what the VoiceXML markup language is,and more importantly, how it works and the type of applications you can develop usingthis technology.VoiceXML (VXML) is a W3C endorsed markup language that allows developers to writeadvanced telephony applications using the same development models that are used insoftware development. It involves a combination of standardized languages andoff-the-shelf hardware components.VXML. But different vendors have slightly different implementations of VXML based ontheir product features.We will discuss a generic VXML structure here that is usually the same acrossall platforms.There were a number of enterprises using voice applications before VoiceXML camealong. But these products needed substantial investment in terms of expensive hardwareand proprietary software. Scalability and inter-operability were also an issue. As thescope of the application increased, there would be a constant need for hardware andsoftware upgrades. This forced most enterprises to stick with the bare-body system thatthey had developed right in the beginning.As in the software industry, a strong need was expressed for a standardized voicemodel too.VoiceXML allows the average web developer to write telephony applications with theease and simplicity of writing an HTML web page. As VXML is a tag-based markuplanguage, its structure is very similar to HTML in many ways, but instead of being aprimarily visual medium, VoiceXML is an auditory medium that allows the end user tonavigate through his/her 'telephony menu' by using voice commands, rather than byclicking a button on a web page.How does VoiceXML work?As mentioned above, VXML deployments involve VXML code working with a number ofoff-the-shelf components. 2 key components are the Automatic Speech Recognition(ASR) and the Text-to-Speech (TTS) engines.Putting it simply, the ASR is the input component and the TTS is the output component.The ASR engine is used to grab the user audio input and process it as per the rulesdefined in the VXML code. The TTS engine is used to translate the text output of thesystem back to voice to be played back to the user.Most advanced ASR and TTS engines have a level of self-learning built in that allowsthem to train itself as it receives more data. The ASR and TTS engines usually implementSource: Kenneth G. Rehor - www.voicexmlreview.orgVoice Interface v/s Web InterfaceHere we have tried to draw analogies between actions involved in using a Web interfaceand using a Voice interface.Users useWeb page: A screen + keyboard/mouse as a visual interface with software that interpretsHTML and can interact with web servers. Which is a standard web browser.VoiceXML: A phone + engines that recognize spoken input and reads out text as aaudio interface with software that interprets VoiceXML and can interact with webservers (Audio Web Browser).1. StartWeb page: Connect to the Internet and open the browser software on your screen.www.dadp.com prev nextpage 4


Technical article (Cont’d)VoiceXML: Use a phone to call the VoiceXML platform -VoiceXML interpreter, ASR engine & TTS engine.2. RequestWebpage: type the URL into the Address input box.VoiceXML: The application lists out a menu from whicha user can select a particular option by saying it out orselecting a certain key on the keypad.3. FetchWith both the cases, pages are fetched using thetechnologies like Perl, PHP, ColdFusion, ASP, and JSPcan be used to write code that generatesVoiceXML/HTML dynamically.This is where the convergence of different platformshappens. The business logic could be written in onelocation with inputs from multiple locations and canoutput the data to different streams.4. DisplayWebpage: The page is interpreted by the browser andoutput is presented as text and graphics, and input isaccepted from the keyboard or mouse.VoiceXML: The page is interpreted by the VoiceXMLinterpreter and output is presented as audio (recordedor TTS converted)Creating a basic VoiceXML ApplicationA VoiceXML application would be stored in a number offiles with .vxml as the file extension. Every file shouldideally start with the regular XML tagThe vxml tags should then enclose the remainder of thedocument's instructions. Within this tag, the versionattribute should be set equal to the version of VoiceXMLbeing used ("2.0" in the present case) as follows:Inside of the tag, a document is broken up intodiscrete dialog elements called forms.Each form has a name and is responsible for executingsome portion of the dialog. For example, you may havea form called "Welcome" that prompts the caller tomake a selection from a list of options and thenrecognizes the response.A form is denoted by the use of the tag and canbe specified by the inclusion of the id attribute to specifythe form's name. This is useful if the form is to bereferenced at some other point in the application or byanother application. For example,would indicate in a VoiceXML document the beginning ofthe "welcome" form. - encloses a sequence of statements forprompting and computation.WelcomeGrammarsA grammar is what the system expects the user to say.The platform compares what the user has said against thegrammar and acts on it. The grammar consists of singlewords right up to complex phrases. Every field in the formhas some grammar associated with it. Grammar can bepresent at different levels: for the entire platform, for aparticular form or for a single input field. The scope of thegrammar is defined the way we define the scope ofvariables in a software application.A grammar consists of various rules that are used tomatch the input. Most applications have a root rulespecified that can be used throughout the system. If thegrammar has a root rule, then you can use the grammarin your VoiceXML application without naming which ruleto start from. A larger or more complex grammar,however, may have several rules that can be used as astarting point. To use the subrules, the rule has to berequested for specifically. In addition to the subrulespresent, the root rule would still be considered valid.Any VoiceXML application specifies a grammar to usewith the VoiceXML tag. It can use built-ingrammars and application-defined grammars. A built-ingrammar is one that is built directly into the VoiceXMLinterpreter. These grammars can be used right out ofthe box. An application grammar, on the other hand, isone that a developer defines from scratch. Anapplication grammar may be a grammar that is definedspecifically for a particular application or it may bea part of a general library of grammars to be reusedacross applications.Application grammars can either be inline or external.The entire definition of an inline grammar appearsdirectly in the element of the VoiceXMLdocument; the definition of an external grammarappears in a separate file.If the element contains content, that contentis the definition of an inline grammar. If the element doesnot contain content, it must have a value for either thesrc attribute or the expr attribute. In this case, dependingon the value of that attribute, the reference is to either abuilt-in grammar or an external grammar file.The examplebelow shows one of the way to use grammar element inan VoiceXML application.Welcome Please say the name of a sandwich. hamburger |burger {hamburger} | (chicken [sandwich]) {chicken}VoiceXML ServicesSome key services that are best suited to the VXMLplatform are listed here. Most of these applications havebeen around for a while as standalone products. With thewww.dadp.com prev nextpage 5


Technical article (Cont’d)emergence of VXML, these can be merged with dataapplications and be processed in common locations.Over a period of time, the number of services beingoffered using this platform has increased. Services thatcan be - and to some extent are – offered includeinformation retrieval, directory assistance, e-commerceand unified messaging.Information Retrieval includes address news, stock,traffic information based on the location. Directoryassistance is another service where cost-savings andrising efficiency have been noticeably high. E-Commerceincludes banking sites where users can get their accountinformation on the phone without human intervention.This increases security as well as improves response timefor such requests.Unified messaging is one area where the voice platformwill have substantial usage. The user can configure emailaccounts on a particular number, and when the user callsinto the specified number, his/her emails can be read outto the user. This can also be extended to calendar andaddress book information.References:1. http://www.vxml.org2. http://www.voicexmlreview.org3. http://www.voicexml.org4. http://developer.voicegenie.com5. http://cafe.bevocal.com6. VoiceXML: Strategies and Techniques for EffectiveVoice Application Development with VoiceXML 2.0 –Chetan Sharma and Jeff KuninsAbout the authors :Ritesh Shah is currently working as a Technical Lead withthe Applications Solutions & Content Group, <strong>Reliance</strong><strong>Communications</strong>. He holds an MS in Computer Sciencefrom the University of Massachusetts. He enjoys readingand going on long drives. He can be reached atRitesh.b.Shah@relianceada.com.Vishnu GoudaHe is currently working as a Senior Developer with theApplications Solutions & Content Group, <strong>Reliance</strong><strong>Communications</strong>. He enjoys listening to music, playingcricket and is passionate about blogging. He can bereached at Vishnu.Gouda@relianceada.comBest practices to improve performance in ServletsTechnical tipPart -1Overview of ServletsServlets represent an extension to the HTTP server. Ittakes http request as an input and sends the httpresponse to the client as an output. Servlet API providestwo packages they are javax.servlet andjavax.http.servelt. These packages contain interfaces andclasses to deal with generic and http functionality thatmeans you can write a Servlet in java to get http requestand send a http response to the client. Client is typicallya browser. These interfaces are implemented by ServletEngines. There are numerous vendors who provideServlet Engines to work with Servlets, for exampleTomcat, weblogic, webshpere etc.Servlet is loaded into the memory by Servlet Engine andit calls init() method on first request and then onwardsonly service() method is called for every other request bycreating a separate thread for each request and finallydestroy() method is called when the Servlet is removedby the Servlet Engine. Service() method can be replacedby doGet() or doPost() method.Note that this architecture is a multi threaded modelwhich is generally followed in most of the applications.You can even work with single threaded model byimplementing SingleThreadModel interface where theServlet Engine creates a separate Servlet instance foreach request.Use init() method as cacheThe default mechanism of a Servlet Engine is to load aServlet in multithreaded enviroment. In this environment,a Servlet init() method is called only once in its life time.You can improve performance using init() method. Youcan use this method to cache static data.Generally a Servlet generates dynamic data and staticdata. Programmers often make a mistake by creatingboth dynamic and static data from service() method.Obviously there is a reason to create dynamic databecause of its nature but there is no need to createstatic data every time for every request in service()method.www.dadp.com prev nextpage 6


Technical tip (Cont’d)Optimization techniques in service() methodWhen you write a service() method for your Servlet, youcan improve performance by using following techniques.1. Use StringBuffer rather than using + operatorwhen you concatenate multiple strings.2. Use print() method instead of println() method.3. Use ServletOutputStream instead of PrintWriter.4. Initialize the PrintWriter with proper size.5. Flush the data partly.6. Minimize the amount of code in thesynchronized block.7. Set the content length.Cache the static and dynamic dataThe use of caching in different areas of your applicationgives very good performance. Generally everyapplication's database schema will have at least someread only tables. There is no need of accessing thesetables every time. You can cache that data in memoryand reuse it instead of accessing database every time. Itreduces network traffic, consumes less CPU cycles andgives good performance.Caching can be done in three flavors namely static datacaching, semi dynamic data caching and dynamiccaching. Static data means that the data doesn't changein its life time, it always constant. Semi dynamic datameans that the data changes but not often. For examplethe data that changes after every one hour can be calledas semi dynamic data, the data does not change forevery request. Dynamic data means that it changes thedata for every request.We will discuss a few caching techniques to improveServlet performance. They are as follows1. Utilizing Browser caching.2. Caching dynamic data at the server.3. Utilizing application server caching facilities.4. Utilizing Servlet API's built in facility, HttpSession andServletContext objects.Caching at init() method is useful for caching static dataand it reduces the creation time of static data for everyrequest but any way finally we are passing data to theclient on every request. This type of caching is usefulwhen you want to pass both static data and dynamicdata to the client.One more caching technique is utilizing the browsercache and also cache the content at the server, this canbe done by avoiding a call to service() method if theoutput content is not changed. This technique is achievedby implementing getLastModified() method ofHttpServlet class.The third technique is that your application server maysupport caching facility for dynamic data. All you need todo is that configure the caching properties file which issupported by your server. You can give what Servlet youneed to cache and session time out value to removecache content.The fourth technique is that you can use Servlet API'sHttpSession and ServletContext objects for caching.HttpSession object is available for a user session acrossmultiple requests and ServletContext object is availablefor all the users using the application. You can setcacheable objects into these objects and get thoseobjects whenever you require within their scope. Themethods that support caching are:ServletContext.setAttribute(String name, ObjectcacheableObject);ServletContext.getAttribute(String name);HttpSession.setAttribute(String name, ObjectcacheableObject);HttpSession.getAttribute(String name);.....to be cont’d in the next issueAbout the Author : Krishna UdupiKrishna Udupi is currently working as a Java Mobile ApplicationDeveloper with Applications Solutions and Content Group,RCOM. He enjoys blogging and listening to music. You canreach him at: Krishna.Udupi@relianceada.comfrom page 10 ...Monthly Quiz - Answer1Q-ANS : B and C. The result range for random() is 0.0to < 1.0; 1.0 is not in range.2Q-ANS : B. Both substring() and charAt() methods areindexed with a zero-base, andsubstring() returns a String of length arg2 – arg1.3Q-ANS : C and E are correct.4Q-ANS : E. Hashtable is the only class listed thatprovides synchronized methods. If you needsynchronization great; otherwise, use HashMap,it’s faster.5Q-ANS : A is correct. One of the main benefits ofencapsulation is that encapsulated code is much easierto reuse than unencapsulated code.B, C, D, and E are incorrect. B is incorrect becauseinheritance is a concept that isindependent of encapsulation. C and D are incorrectbecause encapsulation does not restrict theuse of overloading or overriding. E is incorrect becauseHAS-A relationships are independent ofencapsulation.6Q-ANS : C. The code will not compile because acontinue statement can only occur in alooping construct. If this syntax were legal, thecombination of the continue and the ifstatements would create a kludgey kind of loop, but thecompiler will force you to writecleaner code than this.A, B, and D are incorrect based on the program logicdescribed above.www.dadp.com prev nextpage 7


Interview of the MonthSandeep GangulyQ1: Can you tell us about your company - OnMobile?OnMobile is in telecom Value Added Services (VAS) and apioneer in voice services and has developed and deployeda Indian speech recognition system across twelvelanguages and owns the IP for the same. In recent yearsit has ventured into new verticals of mobile contentdistribution, interactive media portal, mobile advertising,1-to-1 direct mobile marketing and M-Commerce inIndia. OnMobile has operations across eight countries andits customers are telecom operators, media houses,Corporate houses & merchants by providing a turnkeysolution to launch and operate VAS.languages like English, Hindi, Punjabi, Marathi, Telugu,Tamil, Malayalam, Kananda, Gujrati and Bengali. Theservices are varied; some of the popular ones are Music,Mytunes, Contest, Voting and Dating. The languagebreak-up on our platform are as follows:Sandeep Ganguly leads the Sales and Marketing Team ofOnmobile. He has over 14 years of sales and marketingexperience in the Telecom Industry. In his current profilehe is responsible for Business Development and AccountManagement for the Private Telecom Operators withinIndia. Sandeep holds a Bachelor’s Degree in Electronicsand Communication ( Pune University) and an MBAfrom IIM Kolkata.VAS is also trying to convert the mobile phone into amultipurpose device providing entertainment like music,downloading full track songs, executing financialtransactions like paying phone bills and using it as anextension of your computer.The Value Added Services ecosystem has 3 mainconstituents: The Platform/Technology Provider Applications Developer Content Aggregator Content GeneratorOnMobile provides a comprehensive managed solution toits customers that include the first 3 components.Additionally, we provide Technical, Operational andMarketing support services for all our customers, whichenable them to focus on marketing the product,expanding the subscriber base for these services,increasing usage and maximizing revenues.Q2: In what areas is OnMobile currently working with<strong>Reliance</strong> <strong>Communications</strong>?Voice PortalThe primary service offered by OnMobile is theMulti-modal Multilingual Voice Portal services branded as51234 by <strong>Reliance</strong>. <strong>Reliance</strong> subscribers can access ahost of services on this voice portal in 10 regionalMRadio – the latest and most innovative product in themusic vertical.‘Music lovers rate OnMobile’s MRadio better than regularRadio channel’The consumer chooses the song he wants to hear on it byjust dialing 51234777 (on monthly subscription plan) or51234778 (non-subscriber) and enjoys an uninterruptedflow of songs of his choice – skipping songs he does notlike & uninterrupted by advertisement.www.dadp.com prev nextpage 8


Interview (Cont’d)The service is a music lover’s delight across the country,offering latest full length songs ranging from the latestBollywood hits, regional hits, devotional etc. Music loversin small cities & towns often deprived access to the latestsongs are now enjoying their favorite music on MRadio,by accessing it from anywhere & anytime - even in thedead of the night. .MRadio has many innovative features like personalalbum feature turns it into a ‘Personalized Radio’. Itempowers the subscriber to build his own collectionof latest hit songs.The approach is to provide a radio experience to theconsumer where he/she controls the listening pattern.So from a mass product the radio becomes a personalentertainment tool.Find-a-FriendA user generated application, Find-a-Friend is a platformto get to know like minded people. OnMobile’s in-houseconsumer research team conducts regular & periodicsurvey to capture the consumer behaviour across rural &urban markets – what are the end consumer’s need &expectation from the various services being consumed byhim. The study on Find-a-Friend service highlightedsome exciting new opportunities which led to anintroduction of a host of new features like online chat,dedication of songs and event based promotions.Q3: How are OnMobile and <strong>Reliance</strong> <strong>Communications</strong>together creating value for the RCOM subscribers?Product innovation has predominantly been the mantra -in the form of simplifying user experience, packaging andflexible pricing. Providing a simple, intuitive and elegantuser experience is one of the key factors that havedetermined the success of our relationship.<strong>Reliance</strong> Communication has always provided better valuefor money for its world class services to its subscriber’sbase & we at OnMobile keep working on multiple frontsof User Interface and Packaging to reach out to moreconsumers with the same philosophy. While pay-per-usebusiness models were relevant during the initial phases,we’ve introduced Subscription Services, which assuresusers of getting the content or service they desired at adefined price point.Q4: Your views on the future of VAS in India / yourfuture on the VAS scenario today and the days to come?While traditionally the mobile operators have been theprimary brand and provider of mobile content, Mediacompanies have started to brand and offer their ownproducts and content cutting across all Operators. Called‘Open-Garden’ services, the mobile operator still plays apivotal role in delivering content to the users, but theproducts are packaged branded and promoted by themedia companies. This is leading towards a convergencein the Telecom and Media space with mobiles becomingan essential channel alongside print, radio and TV. Thisconvergence is being driven by new technologies like LiveStreaming, Personalized Radio and the like.Q5: Future plans of OnMobileWe believe in providing cutting edge easy to usetechnologies & some our other successful products areasare -On Device Portal: A handset client that is resident onthe user’s mobile phone downloading contentautomatically at requested periodical intervals and allowsusers to easily browse through the content catalogue orget the latest information, via a simple and easy to usegraphical user interfacePhone Backup: The product allows users to backup allthe contents on their mobile phone including addressbook, messages, pictures and downloaded applicationsonto a central network repositoryEase of content discovery, i.e the long tail approach.User should be empowered to discover content onthe platform, instead of being stuck with what isoffered upfront.Press * to Copy: When users listen to someone’s RBT andlikes the song, they can simply set it as their own RBT byjust pressing a single key on their phone keypad. This isby far the simplest application seen across the worldtoday, wherein a customer can get something he likes atliterally a single click of a button. The magnificence ofthe service is sometimes missed because of its simplicity.Media: 505-xxxx is a service that is used by media andprint companies to reach out to all customers on a singleaccess code.Rural: This is a new initiative and focus. These areinitial days and we see a huge potential from theseareas going forward.The objective is to understand the needs of the newconsumers of RCOM and create Value Added Servicesthat they need for their daily activities. It is a difficultobjective but the consumer will reward the companyaddressing the consumer’s needs.www.dadp.com prev nextpage 9


Monthly Quiz1. What two statements are true about the result obtainedfrom calling Math.random()?(Choose two.)A. The result is less than 0.0.B. The result is greater than or equal to 0.0..C. The result is less than 1.0.D. The result is greater than 1.0.E. The result is greater than or equal to 1.0.F. The result is less than or equal to 1.0.2. Given the following,14. String a = "newspaper"; 15. a = a.substring(5,7);16. char b = a.charAt(1); 17. a = a + b;18. System.out.println(a);what is the result?A. apa C. apea E. pappB. app D. apep F. papa3. What two statements are true about properly overriddenhashCode() and equals() methods?A. hashCode() doesn’t have to be overridden if equals() is.B. equals() doesn’t have to be overridden if hashCode() is.C. hashCode() can always return the same value, regardlessof the object that invoked it.D. If two different objects that are not meaningfullyequivalent both invoke hashCode(), then hashCode()can’t return the same value for both invocations.E. equals() can be true even if it’s comparingdifferent objects.4. Which collection class allows you to access itselements by associating a key with an element’svalue, and provides synchronization?A. java.util.SortedMap D. java.util.HashMapB. java.util.TreeMap E. java.util.HashtableC. java.util.TreeSet5. Which is true?A. Tightly encapsulated classes are typically easierto reuse.B. Tightly encapsulated classes typically use inheritancemore than unencapsulated classes.C. Methods in tightly encapsulated classes cannotbe overridden.D. Methods in tightly encapsulated classes cannotbe overloaded.E. Tightly encapsulated classes typically do not useHAS-A relationships.6. Given the following,1. int I = 0; 2. label: 3. if (I < 2) {4. System.out.print("I is " + I); 5. I++;6. continue label; 7. }what is the result?A. I is 0 C. Compilation fails.B. I is 0 I is 1 D. None of the aboveAnswers :1) B and C. 2) B 3) C and E 4) E 5) A 6) C. .....for detailed explanation go to page no. 7Monthly PoserWho is the President of ChinaTelecommunications Corporation?1) Wang Xiaochu2) Zhang Weihua3) Chang Xiaobing4) Wu AndiAnswers to the monthly poser should be sentto dadp.newsletter@relianceada.commentioning monthly poser - July 2007 as thesubject with the sender’s location stated. Thewinner will be decided on the basis of a luckydraw and walk away with a prize.CongratulationsThe winner of last month’s (June 2007)Monthly Poser through a lucky draw is Mr.Sureshbabu N from TamilnaduYou can contribute ideas and information to R-<strong>evolution</strong> at the following e-mail address: dadp.newsletter@relianceada.com.Please note that contributions maybe edited for clarity, style or length.Editorial Team: Suresh Dabbara, Krishna Udupi, Chanda MahajanDesign Team: Jophi JosePublished by the <strong>Reliance</strong> Developer Programme and the Brand Team, <strong>Reliance</strong> <strong>Communications</strong>, DAKC, Navi Mumbaiwww.dadp.com prevpage 10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!