想学android 编程,看了很多网站的java基础,然后发现到android 应用断层太大了.比如下面这种语法根本没有在Java基础讲过
list.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
System.out.println(list.getSelectedValue());
}
});
在function()中 new 了一个对象,对象里还有个方法是什么鬼? 这个断层,导致学android 根本看不下去.....据猜测是外面这个方法需要一个对象,这个对象需要重新写一个方法来执行?但是我不能靠这猜测去学个语言啊?这个断层应该怎么补?没处下手,可以指导下应该去哪里学这些个东西吗?
有没有愿意指导下的.带我入门?拜个师傅?可以花个小钱哈.刚毕业还没工作,木有很多钱,只要带入门就可以.
天蓬老师2017-04-18 09:06:19
Similar to this type, it does not count as a gap between Java and Android. Java itself contains these syntaxes, and Android does not extend Java's syntax. The usage in your example is also common when writing other types of Java applications.
I don’t have a video to provide, because once you watch the video, you won’t be able to judge whether it is complete, how it is, and what is said in it. The links below are recommended books.
Nine books
The suggestion is to find a book that explains the Java language, refer to the table of contents to see if you don’t know it, and study this part specifically. Because many of the features deserve a book of their own. Such as lambda, nio, reflection, virtual machine, etc. Fortunately, you don’t need to use it much when writing Android, just a basic understanding is enough.
The so-called gap between Android and Java should be the limitations and expansions when using Java. For example, the main thread cannot access the network, and OOM errors are prone to occur when there are many pictures; Android provides many classes used in the Android system, and most of them are used when you write Android applications.
伊谢尔伦2017-04-18 09:06:19
Because the way of using anonymous inner classes in Android should not be considered the basics of Java
大家讲道理2017-04-18 09:06:19
Anonymous classes are also found in Java. Read the entire Java book. You don’t need to understand it. Just go through it in general, and then come back and read it if you encounter something you don’t understand.
阿神2017-04-18 09:06:19
What do you mean by java basics...?
You can take a look at anonymous classes
天蓬老师2017-04-18 09:06:19
These are all basic knowledge of java. . . You should go through the basics of Java first.
大家讲道理2017-04-18 09:06:19
Keep reading android code, keep writing, if you don’t understand, then read books and look up information, you should be able to make perfect with practice
ringa_lee2017-04-18 09:06:19
ListSelectionListener is an interface. Directly writing new ListSelectionListener is actually an abbreviation. New is an anonymous class that implements this interface. The methods inside are of course the implementation of the methods in the interface.
Very basic java knowledge, lz still needs some tutoring
阿神2017-04-18 09:06:19
I suggest lz calm down and catch up on the basic knowledge of java and android, and watch more demos and write more, and the feeling will come naturally~
迷茫2017-04-18 09:06:19
Stop talking nonsense, an anonymous implementation class is a fault? Have you ever written about swing? Have you seen some of the jdk source code? . . .
What you lack is the systematic experience and model of Android development.