摘要:
.使用内部存储方式实现图片一 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schem 阅读全文
摘要:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/ 阅读全文
摘要:
1..返回键实现对话框弹出是否退出应用程序package com.example.week5; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.app.AlertDia 阅读全文
摘要:
1.定义一个点类Point, 包含2个成员变量x、y分别表示x和y坐标,2个构造器Point()和Point( intx0,y0),以及一个movePoint (int dx,intdy)方法实现点的位置移动,创建两个Point对象p1、p2, 分别调用movePoint方法后,打印pl和p2的坐标 阅读全文
摘要:
1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值。(知识点:数组定义和创建、一维数组初始化) public static void main(String[] args) { // TODO Auto-generated method stub i 阅读全文
摘要:
1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 package nj666; public class xn1 { /** * @param args */ public static void main(String[] args) { // 阅读全文
摘要:
练习 1.使用for循环计算1-100的和,除了以3结尾的那些数 package Second; public class S1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generate 阅读全文
摘要:
1.分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) while循环: package work; public class work { public static void main(String[] args) { int i=1; i 阅读全文
摘要:
public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("请输入a值"); int a=input.nextInt(); System.out.println( 阅读全文
摘要:
1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package zsw; import java.util.Scanner; //1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) public class zsw { /** 阅读全文