摘要: .使用内部存储方式实现图片一 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schem 阅读全文
posted @ 2021-11-04 18:14 张思文04 阅读(21) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/ 阅读全文
posted @ 2021-10-09 16:18 张思文04 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1..返回键实现对话框弹出是否退出应用程序package com.example.week5; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.app.AlertDia 阅读全文
posted @ 2021-09-26 19:43 张思文04 阅读(4) 评论(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 16:18 张思文04 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值。(知识点:数组定义和创建、一维数组初始化) public static void main(String[] args) { // TODO Auto-generated method stub i 阅读全文
posted @ 2021-04-27 20:19 张思文04 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 package nj666; public class xn1 { /** * @param args */ public static void main(String[] args) { // 阅读全文
posted @ 2021-04-22 20:04 张思文04 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 练习 1.使用for循环计算1-100的和,除了以3结尾的那些数 package Second; public class S1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generate 阅读全文
posted @ 2021-04-14 13:31 张思文04 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 1.分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) while循环: package work; public class work { public static void main(String[] args) { int i=1; i 阅读全文
posted @ 2021-04-07 23:49 张思文04 阅读(92) 评论(1) 推荐(0) 编辑
摘要: public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("请输入a值"); int a=input.nextInt(); System.out.println( 阅读全文
posted @ 2021-03-29 14:38 张思文04 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package zsw; import java.util.Scanner; //1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) public class zsw { /** 阅读全文
posted @ 2021-03-29 13:02 张思文04 阅读(53) 评论(0) 推荐(0) 编辑