I'm searching for useful Android Studio keyboard shortcut for commenting code, as in Sublime Text or Eclipse.
When I press either cmd+/ or cmd+maj+/ nothing happens...
Line Comment hold both: Cmd + /
Block Comment hold all three: Cmd + Alt + /
Line Comment hold both: Cmd + + =
Block Comment hold all three: Cmd + Alt + + =
Line Comment hold both: Ctrl + /
Block Comment hold all three: Ctrl + Shift + /
Same way to remove the comment block.
To Provide Method Documentation comment type /**
and press Enter just above the method name (
It will create a block comment with parameter list and return type like this
/**
* @param userId
* @return
*/
public int getSubPlayerCountForUser(String userId){}