• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Returning value from method  RSS feed

 
Ranch Hand
Posts: 37
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain the following code:

when i pass the value of m=60 and n=0 to method Test() ,why it returns 62 not 64?
 
Master Rancher
Posts: 1161
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ah it should... return 62 that is


n is equal to 0 so that's the if statement that's bin executed. m = 60, 60 + 2 = 62 (not 64)
 
Shubham Rai
Ranch Hand
Posts: 37
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In short according to  WIPO Copyright Treaty the exclusive rights are only applicable in the country or region in which a patent has been filed and granted, in accordance with the law of that country or region.And also you said i am posting on a US forum but sir i am posting on this forum  because this forum is accessible legally from my country and i am not using proxy for posting.
 
Sheriff
Posts: 5745
148
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The above comment probably should have been posted here:

https://coderanch.com/t/704679/Quoting-Sources-Code

Please keep the discussion on this thread about the subject line, "Returning value from method."
 
Catch Ernie! Catch the egg! And catch this tiny ad too:
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!