定义一个类,怎么在新建这个类的时候,只赋值这个类中某几个属性
定义一个类,怎么在新建这个类的时候,只赋值这个类中某几个属性
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
定义一个继承已有类的类,导致进入app首页出现白屏,怎么解决?
220浏览 • 1回复 待解决
HarmonyOS如何获取一个类的父类名称
281浏览 • 2回复 待解决
HarmonyOS可以实现通过一个字符串,直接创建这个类吗?
164浏览 • 1回复 待解决
有没有分开监听同一个类中不同属性的方法?
572浏览 • 1回复 待解决
如何在一个非@Entry的类中创建一个CustomDialogController弹窗
236浏览 • 1回复 待解决
HarmonyOS 如何实现一个抽象类的Base页面,所有的APP页面都是继承这个页面?
89浏览 • 1回复 待解决
如何封装一个通用的commonEvent工具类
1705浏览 • 1回复 待解决
判断类是否实现了某接口
225浏览 • 1回复 待解决
HarmonyOS 页面基类,有多个页面的情况下,怎么设计一个基类来继承呢?
91浏览 • 1回复 待解决
DevEco Studio新建类为啥不带public?
5633浏览 • 1回复 已解决
相机类开发只支持 Java 吗?
2558浏览 • 1回复 待解决
HarmonyOS 如何让自定义类中的属性变化引起UI刷新?
157浏览 • 1回复 待解决
ArkTS怎么自定义滑动,当前只看到scroller,但是这个必须绑定一个可支持滚动的组件
1707浏览 • 2回复 待解决
HarmonyOS 怎么给类的属性赋默认值
359浏览 • 1回复 待解决
HarmonyOS 页面怎么继承基类,有些重复的弹窗想抽到基类中
124浏览 • 1回复 待解决
getContext(this)能否在自定义类中使用
2080浏览 • 1回复 待解决
在c++中实例化自定义类并调用方法
175浏览 • 1回复 待解决
HarmonyOS @Observed装饰的类,构造了对象数组,那这个数组中对象的属性变化之后,能引起视图的更新吗
446浏览 • 1回复 待解决
如果将一个Resource类转化成PixelMap或者ImageBitmap
1822浏览 • 1回复 待解决
android的TouchDelegate类对应鸿蒙是哪个类?
5358浏览 • 1回复 待解决
如何在不修改类,不继承类的情况下为类添加方法?
122浏览 • 1回复 待解决
DevStudio中为何进入一个类后所有方法都只有一行代码
4161浏览 • 1回复 已解决
HarmonyOS 组件内的一个prop定义后给默认值,外部调用不传这个属性。
282浏览 • 1回复 待解决
点击一个list的item,怎么给这个item添加class
5784浏览 • 1回复 待解决
#鸿蒙学习大百科#如何实现一个NavPathStack的派生类?
36浏览 • 1回复 待解决
可以在定义构造器时,将非必填属性设置为可选参数,在定义类型时冒号前加问号。