---
title: "JAVA三元运算"
author: "caryt"
date: "2013-06-27T11:13:00Z"
tags: []
slug: "java"
draft: false
lastmod: "2014-04-25T10:57:16Z"
id: 2054454
url: "https://caryt.iteye.com/blog/2054454"
---

/\**  
\*  
\* @author caryt  
\*  
\*/  
public class test {  
static String test2(){  
int i=9;  
return i&lt;10? "yes":"no";  
}  
/\**  
\* @param args  
\*/

public static void main(String\[] args) {  
// TODO Auto-generated method stub

System.out.println(test.test2());

}

}

out: yes