【JAVA_SE】作业练习1022

OPPO(畅思安卓)广告sdk接入unity工程遇到的一些错误和解决方案 在广告sdk接入过程中,如果碰到的第三方广告sdk是个 unitypackage,那么导入一下就基本万事大吉。但是往往第三方广告商的sdk都是针对安卓(java)层面或者iOS(Objective-C)层面的库,这个时候就需要写几个中间层来从unity工程里去调用那些非C#的语言支持的库。这个过程也往往意味着会有很多比较偏底层的调试工作要进行。 要验证广告sdk是否接入成功,看到广告可以 阅读详情

1.形式参数和返回值问题
  形式参数
   1)基本数据类型:要什么数据类型,在实际传参的时候就传什么数据类型
   2)引用类型:
        具体类:如果形式参数是一个具体类,那么需要创建该类对象
        抽象类:如果形式参数是抽象类的情况,那么需要自定义一个抽象类的子类,来进行实例化(创建对象)!创建对象的实质:抽象类多态!
        接口:如果形式参数是接口情况,那么需要自定义一个接口的子实现类,然后通过接口多态的形式给接口进行实例化!(接口多态)
  返回值类型
   1)基本类型:要求什么数据类型就传出什么数据类型的数据
   2)引用类型:
        具体类:直接返回该类对象(通常实际开发中使用的是匿名对象)
        抽象类:返回值如果是抽象类,需要的返回是该抽象类的子类对象
        接口:返回值如果是接口类型,需要的是返回该接口的子实现类对象(通过子实现类进行实例化)

2.内部类的概述及访问特点
   在一个类中定义另一个类,那么把这种情况叫做内部类
   内部类是直接可以访问外部类的成员,包括私有
   外部类想要访问内部类的成员,必须通过创建内部类的对象访问该内部类的成员
   
3.内部类的分类
   成员内部类:在外部类的成员位置
   局部内部类:在外部类的局部位置定义的这个类

4.匿名内部类的格式和应用及面试题
   匿名内部类:是内部类的简化版格式
   格式:
   

new 接口名或者类名(){
    方法重写;
}
匿名内部类面试题:
        按照要求,补齐代码
            interface Inter { void show(); }
            class Outer { //补齐代码 }
            class OuterDemo {
                public static void main(String[] args) {
                      Outer.method().show();
                  }
            }
            要求在控制台输出”HelloWorld”

应补充:

public static Inter2  method(){ 
        return new Inter2(){
            public void show() {
                System.out.println("helloworld");
            }
        } ;
    }
DeepSeek Harness“一切皆插件”核心机制详解 DeepSeek Harness 的“一切皆插件”核心 = Cordis 微内核 + 服务化能力接口 + 声明式依赖注入 + 类型化事件 + 可逆副作用 + 配置层 Profile/Bundle/Patch 组合。它的工程收益是:把模型、工具、循环、存储、UI 等所有 Agent 能力都变成“可从配置替换、可干净装卸”的单元,而不是写死在框架里。 阅读详情

相关推荐

拯救者R9000P-2021-AMD5800H黑苹果EFI配置与优化指南

本文详细介绍了在联想拯救者R9000P 2021款(搭载AMD锐龙7 5800H处理器)上安装和优化黑苹果系统的完整指南。内容涵盖EFI配置、OpenCore引导设置、关键驱动(如NootedRed核显驱动)的调整,以及安装后的性能调优与常见问题解决,旨在帮助开发者和极客用户在这款游戏本上搭建稳定可用的macOS开发环境。

weixin_29291069的博客 288

练习三1022*

 Problem V Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 42   Accepted Submission(s) : 18 Problem Description The aspiring Roy the Robbe

baidu_34275752的博客 283

以LAN8720A为例的以太网硬件设计方案

输入时钟(XTAL1/CLKIN,XTAL2):推荐外加25MHz(性价比较高)晶振为PHY芯片提供时钟,PHY芯片内部PLL将其倍频为50MHz来使用,亦可使用直接使用50MHz晶振。三位MODE通过高低电平组合分别对应以上8种模式 ,包含10M半双工,10M全双工,100M半双工,100M全双工,是否启用自协商协议,CRS是否有效等。VDDCR:1.2V电源,可由芯片内部稳压电源提供,亦可由外部电源提供,由外部电源提供可降低芯片功耗。REF_CLK:参考时钟,由MAC或外部时钟晶振向PHY芯片提供。

weixin_46154042的博客 5884

1022: 三整数排序 Java

1022: 三整数排序 时间限制: 1 Sec 内存限制: 30 MB 提交: 50615 解决: 25888 [状态] [讨论版] [提交] [命题人:admin] 题目描述 从键盘输入三个整数x,y和z,按从大到小的顺序输出它们的值。 输入 输入三个整数x,y和z。 输出 按从大到小的顺序输出它们的值。 样例输入 Copy 20 16 18 样例输出 Copy 20 18 16 /* * 按从大到小的方式对三整数排序 */ //导入java.util.*; import java.util.

指尖跳动的字节的博客 449

Jetson AGX Orin到手必看:DP线选错黑屏、SSD不识别?这篇避坑指南帮你一次搞定

本文详细介绍了Jetson AGX Orin开发套件的硬件避坑指南,涵盖开箱检查、DP线选择、SSD兼容性等关键问题。通过实测数据和实用技巧,帮助开发者避免黑屏、存储不识别等常见问题,提升开发效率。特别推荐符合VESA认证的DP 1.4a线缆和兼容性优秀的SSD型号,确保设备稳定运行。

weixin_33696822的博客 434

相机标定原理与张氏标定法

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Markdown编辑器 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar

heeweii的博客 2280

SDAU 课程练习 1022

Problem V Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 24   Accepted Submission(s) : 8 Problem Description The aspiring Roy the Ro

窦小雨的小点子 323

InterSystems IRIS 数据库数据平台安装

下载地址:安装包:IRIS_Community-2024.1.0.267.2-win_x64.exe。

yuguang的博客 2373

java 类型修饰符,什么是Java基本数据类型修饰符?

Alright, I've been programming in Java for the better part of three years, now, and consider myself very experienced. However, while looking over the Java SE source code, I ran into something I didn't...

weixin_36249618的博客 204

软件崩溃时Visual Studio中看不到有效的调用堆栈,使用Windbg动态调试去分析定位

当在Visual Studio中遇到软件崩溃且无法查看详细调用堆栈时,可以使用Windbg进行动态调试去分析定位问题。

dvlinker的技术专栏 1万+

YOLOv11改进前必看 - YAML模型配置文件详细解读(再也不用担心通道数不匹配) 附网络结构图

YOLOv11的模型配置文件在中,里面包含以及,本文以目标检测模型文件为例(其他文件完全一致),详细介绍一下YOLOv11模型文件中各参数的含义。

Limiiiing的博客 5313

1022 of dp

Problem V Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 27   Accepted Submission(s) : 10 Problem Description The aspiring Roy the R

toy_block的博客 398

【S32K3 MCAL配置】-3.4-CANFD配置-接收特定的“经典CAN/CANFD标准帧”和“经典CAN/CANFD扩展帧”(基于MCAL+FreeRTOS)

【S32K3 MCAL配置】-3.4-CANFD配置-接收特定的“经典CAN/CANFD标准帧”和“经典CAN/CANFD扩展帧”(基于MCAL+FreeRTOS)

「汽车电子助手」的博客 696

1022_StringBuffer实战

文章目录 在 Java 中,除了通过 String 类创建和处理字符串之外,还可以使用 StringBuffer 类来处理字符串。StringBuffer 类可以比 String 类更高效地处理字符串。 因为 StringBuffer 类是可变字符串类,创建 StringBuffer 类的对象后可以随意修改字符串的内容。每个 StringBuffer 类的对象都能够存储指定容量的字符串,如果字符串的长度超过了 StringBuffer 类对象的容量,则该对象的容量会自动扩大。 ##创建 StringBuff

第507颗星球 249

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Java SE基础2:数据类型与变量

JavaSE基础之数据类型与变量,类型转换。

cirno_bigbaka的博客 1048

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

hdu1022

1)模拟题,不要钻牛角尖,第一种模拟思路过不了,就换一个思路再写;另外,每一次WA,都要检查一遍格式准确吗。 #include #include #include using namespace std; int main() { stack z1; int n; string num1,num2; int IN[120],EX[120]; int

他的博客 723

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

java 1024代表0x_当1024字符是分隔符时,Java Scanner类在标记化时失败

我发现了一个java.util.Scanner类的奇怪行为.我需要将一个String变量拆分为一组由“;”分隔的标记.如果我考虑一个字符串“a [* 1022]”“; [* n]”我期待一个n号令牌.但是如果n = 3,则Scanner类失败:它“看到”只有2个令牌而不是3个.我认为它与Scanner类的内部char缓冲区大小有关.a[x1022]; -> 1 token: cor...

weixin_35794740的博客 362

PAT 甲级 1022 Digital Library (30 分)

1022 Digital Library (30 分) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assign...

liuxinghui_SJTU的博客 245

JAVA怎么算的上熟练_如何才算掌握Java

时常看到一些人说掌握了Java,但是让他们用Java做一个实际的项目可能又困难重重,在这里,笔者根据自己的一点理解斗胆提出自己的一些对掌握Java这个说法的标准,当然对于新手,也可以提供一个需要学习哪些内容的参考。另外这个标准仅限于J2SE部分,J2EE部分的内容有时间再另说。1、语法:必须比较熟悉,在写代码的时候IDE的编辑器对某一行报错应该能够根据报错信息知道是什么样的语法错误并且知道任何修正...

weixin_39884832的博客 197

ACM3-1022

Problem V Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 45   Accepted Submission(s) : 20 Problem Description The aspiring Roy the R

a14772586233的博客 362

LeetCode 1022 可被 K 整除的最小整数(java版)

给定正整数 K,你需要找出可以被 K 整除的、仅包含数字 1 的最小正整数 N。 返回 N 的长度。如果不存在这样的 N,就返回 -1。 示例 1: 输入:1 输出:1 解释:最小的答案是 N = 1,其长度为 1。 示例 2: 输入:2 输出:-1 解释:不存在可被 2 整除的正整数 N 。 示例 3: 输入:3 输出:3 解释:最小的答案是 N = 111,其长度为 3。 cl...

会飞的冰箱的博客 522

集合(list,set)作业

package com.atguigu.exer; import org.junit.Test; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; /** * @author shkstart * @create 2019 上午 9:36 */ public class CollectionTest { @Test pu

qq_46497675的博客 224

PAT甲级-1022 Digital Library (30分)

点击链接PAT甲级-AC全解汇总 题目: A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an un...

卷子的博客 293

单端、差分、共模、差模深入解析:从抗干扰原理到PCB布局与调试

在电子系统设计中,信号如何表示直接决定了电路在噪声环境下的可靠性。单端信号以地为参考,简单但易受地电位差和干扰影响;差分信号通过两根线之间的电压差传递信息,凭借磁场抵消和减法抵消机制显著提升抗干扰能力,被RS485、CAN、USB、以太网等高速远距离接口广泛采用。共模与差模则是分析一对信号线上电压构成的两种分量,共模电压超出器件范围时会导致通信异常甚至损坏电路。正确理解差分阻抗、共模抑制比等参数,掌握示波器测量差分与共模波形的方法,并在PCB布局中保证等长线、完整回流平面,是解决信号完整性问题的关键。本文从

weixin_34331102的博客 398

1499. 数字图书馆 Java题解 (map,set)【PAT甲级1022】

map + set:将每本书的每条信息分别与id存入map中,map的value中存储着满足该信息的所有id的集合。查找时直接在各信息的map中查找并加入set,代码冗余大,较省时。 类+set:将每本书的所有信息都存入类中,查找信息时,遍历所有的书,从中找符合条件的id加入set中,代码冗余小,稍耗时。 存id时,直接放入TreeSet中,自动为字符串按升序存放。

深街酒徒的博客 148

(1022)List、Map、Set 三个接口,存取元素时,各有什么特点【基础】

List、Map、Set 三个接口,存取元素时,各有什么特点?【基础】 1.存放 (1)List存放元素是有序,可重复 (2)Set存放元素无序,不可重复 (3)Map元素键值对形式存放,键无序不可重复,值可重复 2.取出 (1)List取出元素for循环,for-each循环,Iterator迭代器迭代 (2)Set取出元素for-each循环,Iterator迭代器迭代 (3)Map取出元素需转换为Set,然后进行Iterator迭代器迭代,或转换为Entry对象进行Iterator迭代器迭代 List

binggoling 672
上一篇: 【JAVA_SE】作业练习1021
下一篇: 【JAVASE_学习笔记】抽象类与接口
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值