有不小于的东西吗?

时间:2016-11-05 16:50:07

标签: java operators conditional

在我的代码中,我试图创建一个不低于运算符。我做不到import scala.collection.mutable def getUserInputs(map: mutable.Map[Int, String]) { map += (1 -> "ss") // mutating "map" } val rtnMap = mutable.Map[Int, String]() // notice this can be a val getUserInputs(rtnMap) println(rtnMap) // Map(1 -> ss) ......我该怎么办?我可以使用任何包装/方法吗?

2 个答案:

答案 0 :(得分:5)

a<b的反面是a>=b,而不是a>b

编辑:您要查找的语法是!(a<b)

答案 1 :(得分:0)

哦,我太蠢了!我可以做[DllImport("C:\\library.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] private static extern String GetCode([MarshalAs(UnmanagedType.LPStr)]string aUser, [MarshalAs(UnmanagedType.LPStr)]string aPassword); public String getCode(String login, String password) { return GetCode(login, password); }