File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes On new File System NIO and String equality: Which aspects are required? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "On new File System NIO and String equality: Which aspects are required?" Watch "On new File System NIO and String equality: Which aspects are required?" New topic
Author

On new File System NIO and String equality: Which aspects are required?

charlsy chuks
Ranch Hand

Joined: May 18, 2012
Posts: 69
Hi guys,
I was wondering which aspects are required by the Exam council?
The NIO file system seems to be an interesting read. What advantages does it have over the file system that was in existence at Java 6?
My second question is regarding string equality. With Java 7, can we now conveniently do this - string1 == string2 ?

Charles.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29224
    
135

charlsy chuks wrote:The NIO file system seems to be an interesting read. What advantages does it have over the file system that was in existence at Java 6?

It is A LOT more powerful. There are many new APIs like creating relative paths and the like. Plus you can read in files much more conveniently. Plus a lot more - as you noted, it is an interesting read.

charlsy chuks wrote:My second question is regarding string equality. With Java 7, can we now conveniently do this - string1 == string2 ?

No. The only change is the ability to use Strings in a switch. But that is a very specific use case, not general String equality.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
charlsy chuks
Ranch Hand

Joined: May 18, 2012
Posts: 69
Wow! Interesting indeed! I wish I could lay my hands on this material.
In any case, thanks for the reply.

charles
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: On new File System NIO and String equality: Which aspects are required?
 
Similar Threads
I want to Read and copy 800 MB file. Any efficient way.
issue with files reading and processing
How do I copy a file?
Impact of NIO wrt J2EE projects
New IO