[Data Structure]Pre: Java Knowledge

Why do we use Java to learn data structures ?

Java is one of the most frequently used programming languages
} Used for
◦ Developing Android Apps
◦ Helps you to create Enterprise Software
◦ Wide range of Mobile Applications
◦ Scientific Computing
◦ Big Data Analytics (e.g., Hadoop and Spark)
◦ Programming for Hardware devices
◦ Used for Server-Side Technologies like Apache, etc.
◦…
◦ much more!

Java features
◦ It is one of the easy-to-use programming languages to learn
◦ Java is platform-independent. Write once, run anywhere!
◦ It is designed for building object-oriented applications
◦ It is a multithreaded language with automatic memory
management
◦ It is created for the distributed environment of the Internet
◦…

Advantages of Java
◦ Easier to learn
◦ No pointer, safer
◦ Automatic memory management, including garbage
collection
◦ Cross platforms
◦ More powerful standard libraries
◦ Java and Java-based IDEs are often provided free of charge
◦ Often used for research (e.g., Hadoop and Spark)
◦…

What we will learn?
◦ JDK, JVM, JRE
◦ Keywords
◦ Simple declarations
◦ Statements
◦ Classes/objects
◦ Methods
◦ Exceptions
◦ Garbage collection
◦ Web design

Garbage collection
◦ Web design
◦ Android Apps development
◦…
◦ Many others


Only focus on the basic knowledge of Java that is used for implementing the data structures and algorithms in this course!


} What we will NOT learn?
◦ Interface
◦ Abstract class
◦ Inheritance
◦ GUI
◦ Multi-thread
◦ Network communication

◦ Web design
◦ Android Apps development
◦…
◦ Many others

 

Java keywords that you need to notice.

◦ continue: used to continue the loop; it continues the current flow of the program and skips the remaining code at the specified condition

◦ break: used to break loop or switch statement; it breaks the current flow of the program at specified condition

(In Java, the `break` statement is used to exit a loop. It terminates the execution of the current loop and proceeds to the next statement after the loop. Therefore, the `break` statement breaks out of the current loop, not the entire loop structure.)

 

Keywords of exceptions
◦ try: used to start a block of code that will be tested for exceptions. The try block must be followed by either catch or finally block
◦ catch: used to catch the exceptions generated by try statements. It
must be used after the try block only
finally: used to create a block of code following a try block; its
block always executes whether an exception occurs or not

Keywords of others
◦ import: used to make classes and interfaces available and accessible to
the current source code
◦ package: used to declare a Java package that includes the classes
◦ public: It is an access modifier. It is used to indicate that an item is
accessible anywhere. It has the widest scope among all other modifiers
◦ return: used to return from a method when its execution is complete
◦ null: used to indicate that a reference does not refer to anything. It
removes the garbage value

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值