Skip to main content

Home/ Cohort 21 Shared Resources/ Group items tagged java

Rss Feed Group items tagged

agregson

String (Java Platform SE 7 ) - 1 views

  • str =
    • agregson
       
      This is a reference to an object of type String
  • "abc"
    • agregson
       
      This is a String literal; Java allows us to initialize strings this way rather than use the constructor: String str = new String("abc");
  • String()
  • ...5 more annotations...
  • charAt(int index)
    • agregson
       
      This method allows you to access a String as if it were a char array; note that there is no "set" method, since strings are immutable.
  • int indexOf(int ch, int fromIndex) Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. int indexOf(String str) Returns the index within this string of the first occurrence of the specified substring. int indexOf(String str, int fromIndex) Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
    • agregson
       
      Very useful for string processing.
  • split(String regex)
    • agregson
       
      This method is very useful!  If you don't know what a regular expression is, try splitting around " " (a single space) or ",' (a comma).  It will save you much time when reading in data. 
  • String substring(int beginIndex) Returns a new string that is a substring of this string. String substring(int beginIndex, int endIndex) Returns a new string that is a substring of this string.
    • agregson
       
      Commonly used for string processing, in concert with indexOf()
  • trim()
    • agregson
       
      Useful when trying to determine if strings are equal.
kcardinale

Python bumps off Java as top learning language | PCWorld - 0 views

  • Eight of the top 10 computer science departments now use Python to teach coding, as well as 27 of the top 39 schools
    • kcardinale
       
      What schools in Ontario are actually using Python to teach students computer science?
  • Java is frequently used in high school advanced courses, so the transition to Java in college is a natural one for students
  • ...2 more annotations...
  • Java for computer science students and Python to teach programming skills for noncomputer science majors.
  • Other popular languages for teaching include MatLab, a mathematically oriented language often used to introduce scientists and engineers to programming. MatLab, however, seems to be increasingly supplanted by Java.
  •  
    Interesting article that I just read, answering some computer science questions!
1 - 3 of 3
Showing 20 items per page