栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

面试题两则

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

面试题两则

public void test(int a, Catalog catalog) {
   catalog.name = "类别";
   a = 2;
}

int a = 3;
Catalog catalog = new catalog(name="性别");
test(a, catelog);
print(a)
print(catelog.name);

请简要说明 最后两端的打印值,以及原因

private List list;
// 这个T是 ICatalogService 还是 catalogServiceImpl
private T catalogService;
@GetMapping()
public Result delete(@RequestParam(name="id",required=true) String id) {
   if(!checkPremission(id)){
       return Result.OK("权限不足!");
   }
   catalogService.removeById(id);
   list.remove(0);
   return Result.OK("删除成功!");
}
  1. catalogService这个变量指向的类型是:接口还是实现类,说明理由。
  2. 如果我们要做权限保护,A创建的分类,不允许B删除,那权限代码应该怎么写,写在哪里,能用AOP的方式实现吗(简易实现)
  3. 如果按照restful的风格,这个代码应该怎么改。
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1028850.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号