首页 > 美团后端一面
头像
果汁分你一半呀
编辑于 2020-08-11 16:16
+ 关注

美团后端一面

3.我有个超大文本文件,里面每行一个用户名
现在请帮忙编写一个方法,去除重复的用户名后,保存到另外一个文本文件。

2.stdudent_score 表中,
varchar stduentName,
int  yuwen,
int shuxue,
int yingyu
查找语文最好的10个人

1、已知如下定义的学生类,含有一个获取总成绩的方法getTotalScore();现有一个大班的所有学生List<Student> allStudent,请编写一个方法,删除所有总成绩低于200的学生,返回删除的学生列表。

Class Student{
public int  getTotalScore(){
return xxx;
}
}
public static List<Student> getList(List<Student> list){
List<Student> stuDeleteList=new ArrayList<>();
Iterator<Student> it=list.iterator();
while(it.hasNext()){
Student stu=it.next();
int total=stu.getTotalScore();
if(total<200){
stuDeleteList.add(stu);
it.remove();
}
}
return stuDeleteList;
}

spring相关问题
创建两个bean
怎么创建bean XML 注解
Spring为此提供了四个注解,这些注解的作用与上面的XML定义bean效果一致,在于将组件交给Spring容器管理。组件的名称默认是类名(首字母变小写),也可以自己修改:
@Component:当对组件的层次难以定位的时候使用这个注解
@Controller:表示控制层的组件
@Service:表示业务逻辑层的组件
@Repository:表示数据访问层的组件
基于Java类的bean定义(需要提供setter方法)
@Configuration
public class BeansConfiguration {
@Bean
public Student student(){
Student student=new Student();
student.setName("张三");
student.setTeacher(teacher());
return student;
}


maven仓库了解吗——不了解

linux命令行知道哪些
git命令行知道哪些

项目介绍
成绩奖学金比赛 你自豪的事情 你感觉失败的事情

更多模拟面试

全部评论

(6) 回帖
加载中...
话题 回帖

推荐话题

相关热帖

近期热帖

历年真题 真题热练榜 24小时
技术(软件)/信息技术类
查看全部

近期精华帖

热门推荐