无聊的面试题

2018-09-12

System.out.println("hello" + 1 + 2);//输出hello12

System.out.println(1 + 2 +"hello");//输出3hello

String s = "a" + "b" + "c" + "d" + "e"; 问此语句共创建了几个对象, http://blog.csdn.net/java2000_net/article/details/3681385

public class Main2 {
    public static void main(String[] args) {
        Student s = new Student();
    }
    public static class Student{
        public Student(){
            System.out.println("Student build");
        }
        
        {
            System.out.println("Student 。。。");
        }
        
        static{
            System.out.println("Student static");
        }
    }
}

输出结果是:

Student static
Student 。。。
Student build

OGNL表达式

<%@ taglib uri="/struts-tags" prefix="s" %>

<s:property value="name" /> 或  <s:property value="stu.name" />

 EL表达式

 ${stu.name} 

2018-09-13

事务的四大特性:原子性,一致性,隔离性,持久性。

2018-09-14

MySQL的四种隔离级别:串行化、可重复读、读已提交、读未提交。

2018-09-25

jsp九对象:

与servlet有关:page、config

与Input/Output有关:out、request、response

与Context上下文有关:application、session、pageContext

与Error有关:exception

2018-09-28

Java 虚拟机不仅要看类的全名是否相同,还要看加载此类的类加载器是否一样。只有两者都相同的情况,才认为两个类是相同的。即便是同样的字节代码,被不同的类加载器加载之后所得到的类,也是不同的。

 查询学科前2名的sql   博客来源

select * from StudentGrade t
where (select count(1) from StudentGrade where subid=t.subid and grade>t.grade)<=1
order by subId,grade desc

 

转载于:https://www.cnblogs.com/angelshelter/p/9632543.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值