基础数据类型

float a = 0.125f; double b = 0.125d; System.out.println((a - b) == 0.0); 代码的输出结果是什么?

-- true

A. true B. false 董严 double c = 0.8; double d = 0.7; double e = 0.6; 那么 c-d 与 d-e 是否相等?

-- false

A. true B. false 董严 System.out.println(1.0 / 0); 的结果是什么?

-- Infinity

A. 抛出异常 B. Infinity C. NaN 董严 System.out.println(0.0 / 0.0); 的结果是什么?

-- NaN

A. 抛出异常 B. Infinity C. NaN D. 1.0 董严 某个类有两个重载方法:void f(String s) 和 void f(Integer i),那么 f(null) 的会调用哪个方法?

-- 编译错误

A. 前者 B. 后者 C. 随机调用 D. 编译出错 董严 某个类有两个重载方法:void g(double d) 和 void g(Integer i),那么 g(1) 的会调用哪个方法?

-- 后者

A. 前者 B. 后者 C. 随机调用 D. 编译出错 董严 String a = null; switch(a) 匹配 case 中的哪一项?

-- 直接抛出异常

A. null B. "null" C. 不与任何东西匹配,但不抛出异常 D. 直接抛出异常

9

String get(String string, T t) { return string; } 此方法:

-- 编译正确

A. 编译错误,从左往右第一个 String 处 B. 编译错误,T 处 C. 编译错误,Alibaba 处 D. 编译正确

public static void main(String[] args) {
    float a = 0.125f;
    double b = 0.125d;
    System.out.println((a - b) == 0.0);

    double c = 0.8;
    double d = 0.7;
    double e = 0.6;
    System.out.println(c - d == d - e);

    System.out.println(0.0 / 0.0);

    System.out.println(1.0 / 0);

// f(null);

// Object aa= 1d; // g(aa); g(1); g(1d);

    Integer cc = null;

// switch (cc){ // case 1: // System.out.println(1); // break; // default: // System.out.println("default"); // break; // } }

static void f(String s) {
    System.out.println("String");
}

static void f(Integer s) {
    System.out.println("Integer");
}

static void g(Double s) {
    System.out.println("Double");
}

static void g(Integer s) {
    System.out.println("Integer");
}

<String, T, Alibaba> String get(String string, T t) { return string; }

System.out.println(1.0/0); -- "Infinity" System.out.println(-1.0/0); -- "-Infinity" System.out.println(0.0/0); -- "NaN"

{"tradeMode": ["2:com.dr.oursp.retail.support.EnumWrapper", "1:com.dr.oursp.retail.support.EnumWrapper", "5:com.dr.oursp.retail.support.EnumWrapper"], "supplyQuantity": {"lowerBound": {"doubleValue": new NumberInt("0"), "longValue": new NumberLong("0")}, "upperBound": {"doubleValue": 10000000000000000000000000}, "type": new NumberInt("1")}, "minimumPullQuantity": {"lowerBound": {"doubleValue": new NumberInt("0"), "longValue": new NumberLong("0")}, "upperBound": {"doubleValue": new NumberInt("1"), "longValue": new NumberLong("1")}, "type": new NumberInt("1")}, "unitQuantity": {"lowerBound": {"doubleValue": new NumberInt("0"), "longValue": new NumberLong("0")}, "upperBound": {"doubleValue": new NumberInt("1"), "longValue": new NumberLong("1")}, "type": new NumberInt("1")}, "basePrice": {"lowerBound": {"doubleValue": new NumberInt("0"), "longValue": new NumberLong("0")}, "upperBound": {"doubleValue": new NumberInt("10"), "longValue": new NumberLong("10")}, "type": new NumberInt("1")}, "bidMargin": {"lowerBound": {"doubleValue": new NumberInt("0"), "longValue": new NumberLong("0")}, "upperBound": {"doubleValue": new NumberInt("10"), "longValue": new NumberLong("10")}, "type": new NumberInt("1")}, "bidMarginType": new NumberInt("0"), "pickupTime": {"lowerBound": {"doubleValue": new NumberInt("0"), "longValue": new NumberLong("0")}, "upperBound": {"doubleValue": new NumberInt("1672502400000"), "longValue": new NumberLong("1")}, "type": new NumberInt("1")}, "capitalAccountManager": new NumberInt("1000"), "autoMarginScope": [new NumberInt("1")], "forceMarginScope": [new NumberInt("1")], "ruleDescription": "规则描述"}

1638515839514

组织查询 未授权的零售应用 http://localhost:7788/api/v1/operation/org/auth/app/never/retail

com.dr.oursp.app.service.AppManagerService#queryAppByNeverAuth

com.dr.oursp.app.service.AppManagerService#queryApp

Application.selectorRegistered(appRegisteredRepository) .findAvailable() .onShelve(shelveEnums) .generator() .generate(Collectors.toList())

-- 实体 version != 数据库 version 且 version != 0 org.springframework.dao.OptimisticLockingFailureException: Cannot save entity 61a5ccd2caf9ea353cfbe91d with version 4 to collection t_test. Has it been modified meanwhile?

-- 实体 version = 0 ,并且 数据库 id相关的是否存在 org.springframework.dao.DuplicateKeyException: E11000 duplicate key error collection: dr_oursp_retail.t_test index: id dup key: { id: ObjectId('61a5ccd2caf9ea353cfbe91d') }; nested exception is com.mongodb.MongoWriteException: E11000 duplicate key error collection: dr_oursp_retail.t_test index: _id dup key: { _id: ObjectId('61a5ccd2caf9ea353cfbe91d') }