1.1.26

import java.util.*;
class Example1 {

public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int t = 0;

if (a>b) {t=a; a=b; b=t;}
if (a>c) {t=a;a=c; c=t;}
if (b>c) {t=b;b=c;c=t;}
System.out.println(a+» «+b+» «+c);
sc.close();
}
}

1.1.5

import java.util.*;
public class Example{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double x = sc.nextDouble();
double y = sc.nextDouble();

if ((x>0.0&&x<1.0)&&(y>0.0&&y<1.0)){
System.out.println(«true»);}
else{System.out.println(«false»);}
sc.close();
}

}

Упражнение 1.1.3

import java.util.*;
public class Example{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a == b && b == c){
System.out.println(«Равны»);
}else{
System.out.println(«Не равны»);
}
sc.close();
}

}

Androis screeen oriention in titanium

<android xmlns:android="http://schemas.android.com/apk/res/android">
  <manifest>
	<application>
	    <activity
	    android:name="org.appcelerator.titanium.TiActivity"
	    android:configChanges="keyboardHidden"
	       android:screenOrientation="portrait"
	    />
	    <activity android:name="ti.modules.titanium.ui.TiTabActivity"
	      android:configChanges="keyboardHidden"
	    />
	</application>
  </manifest>
</android>

var win = Ti.UI.createWindow({
    width: '100%',
    height: '100%',
    orientationModes: [
        Titanium.UI.LANDSCAPE_LEFT,
        Titanium.UI.LANDSCAPE_RIGHT
    ]
});

Android Menu Titanium

var menu = Titanium.UI.Android.OptionMenu.createMenu();
 
var item1 = Titanium.UI.Android.OptionMenu.createMenuItem({
    title : 'Item 1',
    icon : '/images/item1.png'
});
 
item1.addEventListener('click', function(){
    Ti.UI.createAlertDialog({ title : 'You clicked Item 1'}).show();
});
 
var item2 = Titanium.UI.Android.OptionMenu.createMenuItem({
    title : 'Refresh',
    icon : '/images/refresh.png'
});
item2.addEventListener('click', function(){
    Ti.UI.createAlertDialog({ title : 'You clicked Refresh'}).show();
});
 
menu.add(item1);
menu.add(item2);
 
// Set the menu on the current heavyweight window. A heavyweight window maps to an Android
// Activity. To create a heavyweight window, specify one or more of [**fullscreen**,**navBarHidden**,**modal**] to createWindow.
 
Titanium.UI.Android.OptionMenu.setMenu(menu);
// CODE EXAMPLE - END