This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void doSomething(View v){ | |
| if(v.getId()==R.id.button1){ | |
| Log.d("SOMU","Button was clicked"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <activity | |
| android:name=".MyActivity" | |
| android:label="@string/app_name" | |
| android:configChanges="orientation|screenSize"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <activity | |
| android:name=".MyActivity" | |
| android:label="@string/app_name" | |
| android:screenOrientation="landscape"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class IncrementOperator { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int pen = 5; | |
| int pencil = 1; | |
| //Post increment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class MathOperators { | |
| public static void main(String []args){ | |
| Scanner sc = new Scanner(System.in); | |
| int girls,boys,people; | |
| girls = sc.nextInt(); | |
| boys= sc.nextInt(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class BacisCalc { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| double fnum,snum,answer; | |
| System.out.println("Enter the First number: "); | |
| fnum = sc.nextDouble(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class ReadInput { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| System.out.println(sc.nextLine()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Variables { | |
| public static void main(String[] args) { | |
| int i=5; | |
| System.out.print("The number is "); | |
| System.out.print(i); | |
| System.out.println("."); | |
| System.out.print("It can also be written as this "+i); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HelloWorld { | |
| public static void main(String[] args) { | |
| System.out.print("Hello World"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| JSONArray flimsJSON = new JSONArray(s); | |
| int numVideos = flimsJSON.length(); | |
| for(int i =0; i<numVideos;i++){ | |
| JSONObject titleJSON = (JSONObject) flimsJSON.get(i); | |
| String titleString = titleJSON.getString("title"); | |
| Log.d("TITLE:",titleString); | |
| } | |
| Log.d("Number of MOVIES FETCHED","is"+numVideos); | |
| } catch (JSONException e) { |