jfudson

Documentation Example

Oct 19th, 2020
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Java method documentation example:
  2.  
  3. /**
  4. * Constructs the string representation of the current instance
  5. *
  6. * Example:
  7. * <p><blockquote><pre>
  8. * Object object = new Object();
  9. * System.out.println(getStringRepresentation(object));
  10. * </pre></blockquote><p>
  11. *
  12. * This will output the string representation into the console.
  13. *
  14. * @param object An object
  15. * @return a string describing {@code object}
  16. * @see Object.toString
  17. */
  18.  
  19.  
  20. Python method documentation example:
  21. '''
  22. Constructs the string representation of the current instance
  23.  
  24. Example usage:
  25.  
  26. >>> object = PythonClass()
  27. >>> print(getStringRepresentation(object))
  28. "Some text"
  29.  
  30. Parameters
  31. ------------
  32. object : Any
  33. An object
  34.  
  35. Returns
  36. --------
  37. String
  38. A string describing the object
  39.  
  40.  
  41. See Also
  42. ---------
  43. Object.toString : Native way of getting the string representation of an instance
  44.  
  45. '''
  46.  
  47.  
  48.  
Advertisement
Add Comment
Please, Sign In to add comment