Groovy简单再入门
入门 简单 Groovy
2023-09-27 14:28:45 时间
以前试过,忘得差不多了,趁这次从JAVA一直撸到SERVLET,SPRING,GROOVY,GRAILS的机会,再弄一次吧。。。
def authors = [ "Peter Ledbrook", "Glen Smith" def quoteParts = [ ["Time", "waits", "for no man"], ["The roundhouse kick", "solves", "all problems"], ["Groovy", "is", "the bees knees"] for (i in 0..10) { def quote = createQuote(quoteParts, authors) println quote String createQuote(List quoteParts, List authors) { def rand = new Random() def n = quoteParts.size() def m = authors.size() return quoteParts[rand.nextInt(n)][0] + + quoteParts[rand.nextInt(n)][1] + + quoteParts[rand.nextInt(n)][2] + by + authors[rand.nextInt(m)] }
相关文章
- 【Python从入门到精通】(十七)Python模块和包的基本使用,简单一文,一分钟看完
- 快速入门:GStreamer 常用元素及其用法
- 定时任务框架Quartz-(一)Quartz入门与Demo搭建
- SpringDataJPA入门就这么简单
- SpringMVC入门就这么简单
- 数据的简单处理:pandas模块入门
- 从入门到真香!这些新技术你们都知道吗
- Pytest单元测试框架有多简单,几分钟就能入门
- Docker从入门到进阶之进阶操作(4) —— docker数据的管理
- SPARQL入门(一)SPARQL简介与简单使用
- C# Memcache分布式缓存简单入门
- 前端们,gulp该用起来了,简单的demo入门
- Stage3d 由浅到深理解AGAL的管线vertex shader和fragment shader || 简易教程 学习心得 AGAL 非常非常好的入门文章
- 基于vue-cli、elementUI的Vue简单入门例子
- TensorFlow深度学习视频教程基础入门到实战 图像分类 目标检测TensorFlow Object Detection API
- Python3入门机器学习经典算法与应用 第3章 matplotlib基础
- Cordova简单入门
- 使用 C++11 并发编程入门
- 用几个最简单的例子带你入门 Python 爬虫
- spring cloud alibaba(看完即入门)——Gateway篇
- UEditor富文本编辑器的简单入门
- Oracle19C入门到熟练019-游标
- Ansible入门笔记(3)之Playbook