Kotlin !! What is Kotlin?

Kotlin !! What is Kotlin?

These days some programmers specially who develops mobile application talk about Kotlin

After some years of success, andriod has become one of the leader OS for mobile application. Spcially in more industry level applications are made in Android using Java, which some days ago was the official programming language of Android. But after the Google IO 2017, Google officiallly announced that the officialy programming language of Android is Kotlin.  

It is a greate surprise for developers who loves learning new stuff going around, but for the people who do not want to learn new programming language and want to live with what they already know has a bad breaking news with this announcement.

As an android developer, I need to update my knowledge with those changes. Android officially has an IDE is called Andriod Studio  was released with the support of Kotlin (3.0). Even you can convert old projects into Kotlin as well.

public class MainActivity extends AppCompatActivity {
   @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
       Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
       setSupportActionBar(toolbar);
       FloatingActionButton myfab = (FloatingActionButton) findViewById(R.id.myfab);
       myfab.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View view) {
               Snackbar.make(view, "This is a snackbar", Snackbar.LENGTH_LONG)
                       .setAction("Action", null).show();
           }
       });
   }
}

 

 

 

Leave a Reply

Your email address will not be published.

15 − eight =