AliceAndBob.ctxt 968B

12345678
  1. #BlueJ class context
  2. comment0.target=AliceAndBob
  3. comment0.text=\n\ This\ program\ will\ do\ the\ following\:\n\ Firstly\ ask\ the\ user\ to\ input\ his/her\ name.\ Then\ find\ a\ way\ to\ check\ the\ person's\ name\ to\ see\ if\ it\ is\ Bob\ or\ Alice.\ \n\ If\ the\ user's\ name\ is\ either\ Alice\ or\ Bob;\ then\ a\ greeting\ will\ be\ printed\ to\ the\ screen.\ \n
  4. comment1.params=args
  5. comment1.target=void\ main(java.lang.String[])
  6. comment1.text=\ The\ Scanner\ class\ is\ used\ as\ a\ simple\ text\ scanner\ which\ can\ parse/analyze\ a\ sentence\ in\ parts.\ \n\ In\ this\ case\ Scanner\ is\ used\ to\ scan\ the\ user's\ input\ to\ check\ for\ something\ specific.\ \nSystem.out.print\ ("What\ is\ your\ name?");\ --->\ this\ prints\ "What\ is\ your\ name?"\ to\ the\ console\ and\ this\ prompts\ the\ user\ to\ input\ his/her\ name.\ \n\ String\ name\ \=\ in.nextLine--->\ this\ will\ print\ the\ entire\ line\ that\ that\ the\ user\ enters.\ \n
  7. numComments=2