- 浏览: 62649 次
- 性别:
- 来自: 广州
最新评论
-
weknow619:
详解Spring中Bean的加载(二)链接:http://ww ...
【Spring】详解Spring中Bean的加载 -
moxue0929:
答案答案答案答案答案答案答案vvvv答案答案
【Java每日一题】20170329 -
weknow619:
xiaoyu1985ban 写道编译无法通过。The fina ...
【Java每日一题】20170221 -
xiaoyu1985ban:
编译无法通过。The final local variable ...
【Java每日一题】20170221 -
ericchunli:
world cello
【Java每日一题】20170210
文章列表
20170314问题解析请点击今日问题下方的“【Java每日一题】20170315”查看
package Mar2017;
public class Ques0315 {
int x = 0;
public Ques0315(int val) throws Exception {
if (val != this.x) {
throw new Exception("异常");
}
}
...
20170313问题解析请点击今日问题下方的“【Java每日一题】20170314”查看
package Mar2017;
public class Ques0314 {
public static void main(String[] args) {
try {
return;
} finally {
System.out.println("finally");
}
}
}
今日问 ...
20170310问题解析请点击今日问题下方的“【Java每日一题】20170313”查看
package Mar2017;
import java.io.IOException;
public class Ques0313 {
public static void main(String[] args) {
System.out.println("before try");
try{
}catch (IOException e) {
Syst ...
20170309问题解析请点击今日问题下方的“【Java每日一题】20170310”查看
package Mar2017;
public class Ques0310 {
static void test() {
System.out.println("test method in Test class");
}
public static void main(String[] args) {
Ques0310 test = new Ques0310();
test.tes ...
20170308问题解析请点击今日问题下方的“【Java每日一题】20170309”查看
package Mar2017;
public class Ques0309 {
void Test(int i) {
System.out.println("Int");
}
void Test(String str) {
System.out.println("String");
}
public static vo ...
20170307问题解析请点击今日问题下方的“【Java每日一题】20170308”查看
package Mar2017;
public class Ques0308 implements Runnable{
private String str1 = "this ";
private int[] str2 = {1,2,3,4,5};
public static void main(String[] args) {
Ques0308 test = new Ques0308();
...
20170306问题解析请点击今日问题下方的“【Java每日一题】20170307”查看
package Mar2017;
public class Ques0307 {
private String s1 = "Ques0307 string";
class InnerClass {
private String s2 = "inner string";
public void innerMethod() { ...
20170303问题解析请点击今日问题下方的“【Java每日一题】20170306”查看
package Mar2017;
public class Ques0306 {
static int i = 1;
static {
++i;
}
public static void main(String[] args) {
increment(i, 3);
display(i);
}
static void increm ...
Spring Email抽象的核心是MailSender接口,MailSender的实现能够通过连接Email服务器实现邮件发送的功能,如下图:
Spring自带一个MailSender的实现就是JavaMailSenderImpl,它也是使用JavaMail API来发送Email,在使用之前,必须先将JavaMailSenderImpl装配为Spring应用上下文中的一个bean,如下所示:
@Bean
public MailSender mailSender (Environment env) {
JavaMailSenderImpl mailSender = new J ...
20170302问题解析请点击今日问题下方的“【Java每日一题】20170303”查看
package Mar2017;
public class Ques0303 {
public static void main(String[] args) {
boolean flag = false;
if (flag = true) {
System.out.println("true");
}else {
System.ou ...
20170301问题解析请点击今日问题下方的“【Java每日一题】20170302”查看
package Mar2017;
public class Ques0302 {
public static void main(String[] args) {
String str1 = new String("123");
String str2 = new String("123");
str1 = str1 + 1; // 1
str1 = nu ...
20170228问题解析请点击今日问题下方的“【Java每日一题】20170301”查看
package Mar2017;
public class Ques0301 {
private int a = getB();
private int b = 1;
private int getB(){
return b;
}
public static void main(String[] args) {
System.out ...
20170227问题解析请点击今日问题下方的“【Java每日一题】20170228”查看
package Feb2017;
import java.util.List;
public class Ques0228 {
List<T>
List<?>
List<Object>
}
今日问题:
请问以上三者有什么区别?(点击以下“【Java每日一题】20170228”查看20170227问题解析)
题目原发布于公众号、简书:【Java每日一题】20170228,【Java每日一题 ...
20170224问题解析请点击今日问题下方的“【Java每日一题】20170227”查看
package Feb2017;
import java.util.Arrays;
public class Ques0227 {
public static int getMax(int[] data) {
Arrays.sort(data.clone());
return data[data.length - 1];
}
}
今日问题:
上面的getMax方法是取数组的最大值,为什么要先使用d ...
20170223问题解析请点击今日问题下方的“【Java每日一题】20170224”查看
package Feb2017;
import java.util.ArrayList;
import java.util.List;
public class Ques0224 {
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();
list.add(1); ...