摘要: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.co 阅读全文
posted @ 2021-12-04 20:59 栾进军 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1. 2.九宫格 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rl_1" andr 阅读全文
posted @ 2021-12-01 13:17 栾进军 阅读(4) 评论(0) 推荐(0) 编辑
摘要: com.example.wyn; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.V 阅读全文
posted @ 2021-12-01 13:11 栾进军 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.返回键实现对话框弹出是否退出应用程序 package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.app.AlertDialog; import androi 阅读全文
posted @ 2021-09-26 17:16 栾进军 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Cola公司的雇员分为以下若干类:(知识点:多态) [必做题]• 4.1 ColaEmployee :这是所有员工总的父类,属性:员工的姓名,员工的生日月份。方法:getSalary(int month) 根据参数月份来确定工资,如果该月员工过生日,则公司会额外奖励100 元。• 4.2 Salar 阅读全文
posted @ 2021-06-18 18:20 栾进军 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 2、设计2个类,要求如下:(知识点:类的继承 方法的覆 盖) [必做题] 2.1 定义一个汽车类Vehicle, 2.1.1 属性包括:汽车品牌brand(String类型)、颜色clr (String类型)和速度speed(duble类型)。 2.1.2 至少提供一个有参的构造方法(要求品牌和颜色 阅读全文
posted @ 2021-06-18 18:17 栾进军 阅读(19) 评论(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-24 19:02 栾进军 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 1、编写一个简单程序,要求数组长度为5,分别赋值10,20,30,40,50,在控制台输出该数组的值. public class vbn { /** * @param args */ public static void main(String[] args) { // TODO Auto-gene 阅读全文
posted @ 2021-04-27 16:04 栾进军 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 import java.util.Random; import java.util.Scanner; public class vbn { public static void main(Stri 阅读全文
posted @ 2021-04-18 21:28 栾进军 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1.使用for循环计算1-100的和,除了以3结尾的那些数 public class abcd { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int 阅读全文
posted @ 2021-04-12 20:16 栾进军 阅读(22) 评论(0) 推荐(0) 编辑