---
title: "一个有趣的面试题"
author: "phenix_chen"
date: "2012-06-05T20:47:06Z"
tags: ["面试题"]
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2012-06-05T20:47:20Z"
id: 1552588
url: "https://phenix-chen.iteye.com/blog/1552588"
---

public static boolean isOdd(int i){

return i % 2 == 1;

}

这个方法能正常运转吗？

发挥各位的想象空间

 

 

 

 

 

 

 

 

 

提示：下面这个函数与上面的区别是什么？

public static boolean isOdd(int i){

return i % 2 != 0;

}