Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create method on instance IntelliJ IDEA / Android Studio shortcut

What is the shortcut in Android Studio for "Create a method on instance"? For example, say I have an instance of MyClass but not yet have myMethod:

instance.myMethod();

In Eclipse I can auto-generate myMethod. How can someone do this in Android Studio? I have a Mac.

like image 264
implicit_knowledge Avatar asked Jan 06 '23 15:01

implicit_knowledge


1 Answers

Select function name and give below command:

For Windows:

alt + enter

For MacOs:

command + enter

you will have option to create.

enter image description here

like image 65
KDeogharkar Avatar answered Jan 09 '23 20:01

KDeogharkar