当前位置: 首页 > news >正文

Scala day6(Class,field,Single Object)

Foreword【こんにちは】

Today, we continue to learn Scala Language, though the Scala isn’t easy for Begainner, Big Data Technology need Scala Language, Spark【Distributed Calculation FrameWork】is based on Scala Language designed. I know the learning road has all kinds of difficults, please you believe in only you insist to study it at last, you could become winner in the game.

Text【本】

object day5 {//The Codes in day5.scaladef main(args:Array[String]): Unit = {System.out.println("Scala is make me happy!!");val example = new examexample.calc(45,25)System.out.println();val example2 = new exam2("abc",123)example2}class exam {var sum = 0;def calc(num:Int,num2:Int): Unit = {sum = num + num2;System.out.println("num = "+num);System.out.println("num2 = "+num2);System.out.println("Sum(num,num2) = "+sum);}}class exam2(digit:String,num:Int) {System.out.println("The first parameter is "+digit);System.out.println("The second parameter is "+num);}
}

The output result:
在这里插入图片描述

The above Codes introduce the Class, field, Single Object. We start to analysize them.
Class have parameters or haven’t parameters both executablely. Field is variable in Class, Single Object is haven’t any parameters.

In the end【さよなら】

I gratitude for みんな watch my articles, my passages maybe have some mistakes, if you could point them, I truely thanks for you. Big Data Technology must learn the Scala Language, please you believe in anything both difficult at first. But you need overcome them and you will become the winner in this game. Your Pan【One low quality man of human】, My name have bread meaning at JaPanese Language【パン】, it sounds interesting, hhh.

http://www.xdnf.cn/news/290827.html

相关文章:

  • EPSG:3857 和 EPSG:4326 的区别
  • 掌纹图像识别:解锁人类掌纹/生物识别的未来——技术解析与前沿数据集探索
  • 2025系统架构师---论软件的设计模式论文
  • Java按字节长度截取字符串指南
  • JVM——Java对象的内存布局
  • Hive安装与配置教程
  • 详讲viewer查看器
  • Astro Canvas 数据中心→设备一览大屏操作指南
  • 基于 HTML5 的贪吃蛇小游戏实现
  • Oracle数据库从入门到掌握基础应用能力
  • 16. Qt系统相关:事件、定时器
  • 金融的本质是智融、融资的实质是融智、投资的关键是投智,颠覆传统金融学的物质资本中心论,构建了以智力资本为核心的新范式
  • 启发式算法-禁忌搜索算法
  • Python学习之路(七)-绘画and动画
  • 使用 JavaScript 实现数据导出为 Excel 和 CSV 文件
  • Ultra7-265K 和 技嘉Z890M-AORUS-ELITE-WIFI7主板 简单开箱测评
  • 《Python星球日记》第29天:Flask进阶
  • Unity-Shader详解-其四
  • python计算shp中每个区域的面积
  • Linux 怎么使用局域网内电脑的网络访问外部
  • android-ndk开发(6): 查看反汇编
  • 《算法导论(第4版)》阅读笔记:p7-p8
  • 售前赢单评分是越权吗?
  • 第二章-猜数游戏
  • 数据集-目标检测系列- 牙刷 检测数据集 toothbrush >> DataBall
  • 分析strtol(),strtoul()和strtod()三个函数的功能
  • 字符串哈希专题
  • 架构进阶:什么是数据架构,如何理解数据架构?(华为)
  • 从0开始学习大模型--Day01--大模型是什么
  • 什么是开放数据湖(Open Data Lake)?