摘要: 1.三个界面,界面1点击按钮使用显式意图开启界面2.界面2点击按钮隐式意图开启界面3 2.在界面1做一个按钮开启浏览器访问百度 package com.example.app6; import android.os.Bundle; import android.app.Activity; impor 阅读全文
posted @ 2021-10-07 15:54 温凯文 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1.返回键实现对话框弹出是否退出应用程序import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import android.content.DialogInterface 阅读全文
posted @ 2021-09-25 20:51 温凯文 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1、定义一个点类Point, 包含2个成员变量x、y分别表示x和y坐标,2个构造器Point()和Point( intx0,y0),以及一个movePoint (int dx,intdy)方法实现点的位置移动,创建两个Point对象p1、p2, 分别调用movePoint方法后,打印pl和p2的坐标 阅读全文
posted @ 2021-05-25 15:20 温凯文 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值。(知识点:数组定义和创建、一维数组初始化)[必做题]? import java.util.Scanner; public class jjj { public static void main(St 阅读全文
posted @ 2021-04-27 15:21 温凯文 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1. 编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值. public class xxx45 { public static void main(String[] args) { // TODO Auto-generated method stub 阅读全文
posted @ 2021-04-20 17:49 温凯文 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1.使用for循环计算1-100的和,除了以3结尾的那些数 public class xxxx { public static void main(String[] args) { // TODO Auto-generated method stub int sum=0; for(int i=1;i 阅读全文
posted @ 2021-04-13 16:47 温凯文 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1.分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句 package myWork; public class xxx { public static void main(String[] args) { int sum = 0; int i 阅读全文
posted @ 2021-04-07 17:37 温凯文 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package myWork; import java.util.Scanner; public class work2 { public static void main(String[] args) { Sca 阅读全文
posted @ 2021-03-30 17:27 温凯文 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 1.输出学号班级和姓名 package myWork; public class work1 { public static void main(String[] args) { System.out.println("姓名:"+"温凯文,"+"学号:"+"193230430"); } } 2.输出 阅读全文
posted @ 2021-03-07 21:34 温凯文 阅读(31) 评论(0) 推荐(0) 编辑