Skip to main content

Posts

Showing posts from March, 2021

Abstract classes & Interfaces

Abstract -Abstract in English means existing in thought or as an idea without concrete existance. Abstract method -A method that is declared without an implementation abstract void moveTo(double x ,double y) Abstract class -If a class includes abstract methods, then the class itself must be declared abstract, as in: public abstract class PhoneModel{               abstract void switchoff();                         //code} When an abstract class is subclass the subclass usually provides implementation for all of the methods in parent class If it doesn't , It must be declared abstract be declared abstract. Note- It is possible to create reference of or abstract class.             It is not possible to create an object of an abstract class. We can also assign reference of an abstract class to the object of a concrete subclass. Interfaces in Java- Interface in English is a point where two systems meet and intrace. In Java interface is a group of related methods with empty bodies. class

How to create a new project in android studio

 step1-Open your android studio in you computer. steip2-Go to file in your title bar. step3-Open new and select new project. After it there are many basic project templates which we have to select  since we are preparing here a basic app so we would like select empty project template. step4-Click on next A  new dialog box appear in which you have to fill the name of your own project. After filling it Package name of your project will be filled by itself. you can also customize you project location where you want. step5-select your language . step6-Select you Minimum SDK(which will sure you how much android system your app will run. for a good experience- API 16 : Android 4.1(jelly Bean) suggested. step6-Click on finish  After indexing Your new project will be set.