Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
Parsing of XML data has high CPU usage
Convert simple Javascript to jQuery plugin
Active Record getting unique records
List the files in a directory without the directory name or the extension
clean the code
ohs system, recruitment software, hr software, oh&s software, human resources software, ohs software
Array parsing in a block
Learning JS
Type Safety
Euler Problem 2 solution
Popular
Parsing of XML data has high CPU usage
List the files in a directory without the directory name or the extension
Convert simple Javascript to jQuery plugin
Active Record getting unique records
Breadth first cartesian product iterator
php refactoring
first BST
Learning JS
Too many if statements
clean the code
Pastable version of
Help with new methods
<pre class='prettyprint' language='java'>public class SchoolRoom { private String [] students; public SchoolRoom(String [] students) { this.students = students; } // Returns the number of students in this SchoolRoom. public int enrolment() { return students; } /** * Returns the index of the specified student in this SchoolRoom. * If the student appears more than once, only the index * of the first one (counting from the left) is returned. If the * student is not found in the array, -1 is returned. * if it is found. Returns -1 if the student is not in the array. */ public int indexOf(String target) { } /** * Compares this SchoolRoom object to the object passed * to the method. If that object is also an instance of * SchoolRoom, has the same enrolment (number of students), and * every Student's name in that object is the same as the name * of every Student in the same array position in this * SchoolRoom, then the objects are equal. */ public boolean equals(Object otherString) { SchoolRoom tmpObj = (SchoolRoom) o; if (!(o instanceof SchoolRoom)) return false; //return (; } /** * Returns a new SchoolRoom which has the same students * as this SchoolRoom, but in reverse order. */ public SchoolRoom reverse() { } /** * Returns a new SchoolRoom which has all-capitals names corresponding * to the students in this Schoolroom. */ public SchoolRoom capitalize() { String SchoolRoom; System.out.println(SchoolRoom.toUpperCase()); } }</pre> <a href="http://www.refactormycode.com/codes/140-help-with-new-methods" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>