是否有任何称为“恒定折叠"的概念?在java中? [英] is there any concept called "Constant Folding" in java?

查看:91
本文介绍了是否有任何称为“恒定折叠"的概念?在java中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中是否有称为恒定折叠"的概念?如果是,那是什么?

is there any concept called "Constant Folding" in java? if yes what is it?

推荐答案

常量折叠是在编译时简化常量表达式的过程.常量表达式中的术语通常是简单的文字,例如整数2,但也可以是永远不会修改其值的变量,也可以是明确标记为常量的变量

Constant folding is the process of simplifying constant expressions at compile time. Terms in constant expressions are typically simple literals, such as the integer 2, but can also be variables whose values are never modified, or variables explicitly marked as constant

是的,它存在于Java中:编译器优化

Yes, it's exists on Java: Compiler optimizations

这篇关于是否有任何称为“恒定折叠"的概念?在java中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆