The document discusses the File class in Java, which represents files and directories on disk without providing file processing capabilities. It describes the File class constructors and common methods like exists(), isFile(), isDirectory(), getPath(), and list(). Examples are provided to demonstrate analyzing a file or directory path specified by the user, including checking if it exists, retrieving information about it, and listing the contents if it is a directory. The document also notes some common errors like using \ instead of \\ in file paths in string literals.
FireWatir - Web Application Testing Using Ruby and Firefoxangrez
FireWatir is a tool used for functional testing a web application using Ruby and Firefox browser. You can use the scripts written using WATiR that targets IE with slight changes with FireWatir
XQuery is a standardized language for combining documents, databases, Web pages and almost anything else. It is very widely implemented. It is powerful and easy to learn.
http://KOKUIS.my/html5
HTML5 – refers to the modern day of HTML which promotes native handling of video & audio & animation without having to install additional plugins to browser.
.
Bootstrap – A HTML framework supports responsive web design to provide one time webpage development for smartphone, tablet and desktop.
.
Mobirise – a free web design studio that support HTML5 & Bootstrap’s famous ‘block’ design.
FireWatir - Web Application Testing Using Ruby and Firefoxangrez
FireWatir is a tool used for functional testing a web application using Ruby and Firefox browser. You can use the scripts written using WATiR that targets IE with slight changes with FireWatir
XQuery is a standardized language for combining documents, databases, Web pages and almost anything else. It is very widely implemented. It is powerful and easy to learn.
http://KOKUIS.my/html5
HTML5 – refers to the modern day of HTML which promotes native handling of video & audio & animation without having to install additional plugins to browser.
.
Bootstrap – A HTML framework supports responsive web design to provide one time webpage development for smartphone, tablet and desktop.
.
Mobirise – a free web design studio that support HTML5 & Bootstrap’s famous ‘block’ design.
Recursively Searching Files and DirectoriesSummaryBuild a class .pdfmallik3000
Recursively Searching Files and Directories
Summary
Build a class and a driver for use in searching your computer’s secondary storage (hard disk or
flash memory) for a specific file from a set of files indicated by a starting path. Lets start by
looking at a directory listing. Note that every element is either a file or a directory.
Introduction and Driver
In this assignment, your job is to write a class that searches through a file hierarchy (a tree) for a
specified file. Your FindFile class will search a directory (and all subdirectories) for a target file
name.
For example, in the file hierarchy pictured above, the file “lesson.css” will be found once in a
directory near the root or top-level drive name (e.g. “C:\\”) . Your FindFile class will start at the
path indicated and will search each directory and subdirectory looking for a file match. Consider
the following code that could help you build your Driver.java:
String targetFile = “lesson.css”;
String pathToSearch =”
C:\\\\WCWC”; FindFile finder = new FindFile(MAX_NUMBER_OF_FILES_TO_FIND);
Finder.directorySearch(targetFile, pathToSearch);
File Searching
In general, searching can take multiple forms depending on the structure and order of the set to
search. If we can make promises about the data (this data is sorted, or deltas vary by no more
than 10, etc.), then we can leverage those constraints to perform a more efficient search. Files in
a file system are exposed to clients of the operating system and can be organized by filename,
file creation date, size, and a number of other properties. We’ll just be interested in the file
names here, and we’ll want perform a brute force (i.e., sequential) search of these files looking
for a specific file. The way in which we’ll get file information from the operating system will
involve no ordering; as a result, a linear search is the best we can do. We’d like to search for a
target file given a specified path and return the location of the file, if found. You should sketch
out this logic linearly before attempting to tackle it recursively.
FindFile Class Interface
FindFile(int maxFiles): This constructor accepts the maximum number of files to find.
void directorySearch(String target, String dirName): The parameters are the target file name to
look for and the directory to start in.
int getCount(): This accessor returns the number of matching files found
String[] getFiles(): This getter returns the array of file locations, up to maxFiles in size.
Requirements
Your program should be recursive.
You should build and submit at least two files: FindFile.java and Driver.java.
Throw an exception (IllegalArgumentException) if the path passed in as the starting directory is
not a valid directory.
Throw an exception if you\'ve found the MAX_NUMBER_OF_FILES_TO_FIND and catch and
handle this in your main driver. Your program shouldn\'t crash but rather exit gracefully in the
unusual situation that we\'ve discovered the maximum number of files we were interest.
import required package file import java.io.File; The Filed.pdfanandinternational01
// import required package file
import java.io.File;
// The Filedetails class
public class FileDetails {
// Constructor that performs the action
public FileDetails(String filename)
{
// File object to get details
File file=new File(filename);
// printing obsolute path
System.out.println(\"Absolute path of file:\"+file.getAbsolutePath());
// printing file size in bytes
System.out.println(\"File Size in bytes:\"+file.length());
// Checking if file is readable
if(file.canRead())
System.out.println(\"The file is readable\");
else
System.out.println(\"The file is not readable\");
// checking if file is writable
if(file.canWrite())
System.out.println(\"The file is writable\");
else
System.out.println(\"The file is not writable\");
}
// main method goes here
public static void main(String[] args) {
// TODO Auto-generated method stub
// object instantiation
FileDetails fd=new FileDetails(\"anyfile.doc\"); // You should give exact path and file name
here
}
}
// Importing required packages
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
// the writestring class
public class WriteString {
// Writestring class
public WriteString(String filename,String text) throws FileNotFoundException
{
// File object
File file=new File(filename);
// Printsteam class that connects file using file output stream
PrintStream ps=new PrintStream(new FileOutputStream(file));
// using println method to write to the file
ps.println(text);
}
// main method to execute the code
public static void main(String[] args) throws FileNotFoundException
{
// the writestring class instantiation
WriteString ws=new WriteString(\"f1.txt\",\"Hello World\"); // You should give exact path
and file name here
}
}
// importing packages
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
// The writints class
public class WriteInts {
// the constructor to instantiate
public WriteInts(String filename,int[] myArr) throws FileNotFoundException
{
// File object
File file=new File(filename);
// Using print stream to write integers
PrintStream ps=new PrintStream(new FileOutputStream(file));
//Looping through array elements to write every element
for(int i=0;i
Solution
// import required package file
import java.io.File;
// The Filedetails class
public class FileDetails {
// Constructor that performs the action
public FileDetails(String filename)
{
// File object to get details
File file=new File(filename);
// printing obsolute path
System.out.println(\"Absolute path of file:\"+file.getAbsolutePath());
// printing file size in bytes
System.out.println(\"File Size in bytes:\"+file.length());
// Checking if file is readable
if(file.canRead())
System.out.println(\"The file is readable\");
else
System.out.println(\"The file is not readable\");
// checking if file is writable
if(file.canWrite())
System.out.println(\"The file is writable\");
else
System.out.println(\"The file.
Exceptions, I/O and Threads Input and Output in Java: The File Class, Standard Streams, Keyboard
Input, File I/O Using Byte Streams, Character Streams, File I/O Using Character Streams -
Buffered Streams, File I/O Using a Buffered Stream, Keyboard Input Using a Buffered Stream,Writing Text Files. Threads: Threads vs. Processes, Creating Threads by Extending Thread,
Creating Threads by Implementing Runnable, Advantages of Using Threads, Daemon Threads,
Thread States, Thread Problems, Synchronization. Exceptions: Exception Handling, The Exception
Hierarchy, throws statement, throw statement, Developing user defined Exception Classes- The
finally Block.
Esoft Metro Campus - Diploma in Web Engineering - (Module VIII) Multimedia Technologies
(Template - Virtusa Corporate)
Contents:
include and require Statements
include and require
include_once Statement
Validating Files
file_exists() function
is_dir() function
is_readable() function
is_writable() function
is_executable() function
filesize() function
filemtime() function
filectime() function
fileatime() function
Creating and deleting files
touch() function
unlink() function
File reading, writing and appending
Open File - fopen()
Close File - fclose()
Read File - fread()
Read Single Line - fgets()
Check End-Of-File - feof()
Read Single Character - fgetc()
Seek File - fseek()
Write File - fwrite()
Write File - fputs()
Lock File - flock()
Working with Directories
Create directory - mkdir()
Remove directory - rmdir()
Open directory - opendir()
Read directory - readdir()
In this core java training session, you will learn Examples of File IO &
Introduction to JDBC. Topics covered in this session are:
• File IO Continued
• Intro to JDBC (Java Database Connectivity)
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Text Input / Output: Files, Streams, Standard Library Input / Output Functions, Formatting Input / Output Functions, Character Input / Output Functions, Binary Input / Output: Text versus Binary Streams, Standard Library, Functions for Files, Converting File Type
Application of Ontology in Semantic Information Retrieval by Prof Shahrul Azm...Khirulnizam Abd Rahman
Application of Ontology in Semantic Information Retrieval
by Prof Shahrul Azman from FSTM, UKM
Presentation for MyREN Seminar 2014
Berjaya Hotel, Kuala Lumpur
27 November 2014
This course is the continuation of the previous course (Algorithm and Problem Solving). It introduces complex flow control, method, array, class design, file and file I/O.
Kursus ini membincangkan adab pengendalian maklumat, isu-isu yang berkaitan dengan teknologi komputer dan teknologi maklumat. Penggunaan komputer peribadi dengan memberi pendedahan kepada perkakasan dan perisian komputer. Membincangkan mengenai internet, telekomunikasi serta pencarian maklumat melalui web. Membentuk pelajar yang beradab dalam pengendalian dan pengurusan maklumat.
With Android phones being produced by all of the major phone manufacturers and with the addition of new tablet devices, it's no surprise that the Android platform is the fastest growing mobile development platform in the world. In this course, you will learn to develop Android applications using Java and the Eclipse development environment. You will learn basic application development including using the Android mobile camera, working with local database, and playing audio and video files.
At the end of the course, participant should be able to;
• Use Eclipse and the Android ADT plugin to develop and debug Android applications
• Set up text input from the hardware or software keyboard
• Display scrolling lists and grids with custom layouts
• Listen and react to touch events
• Manipulating Audio
• Handling Video
• Developing Multimedia Apps
Ayat-ayat al-Quran dan Doa-doa yang terdapat di dalam helaian ini adalah seperti yang terdapat di dalam applikasi m-mathurat. Kami juga menyertakan suara bacaan al-Ma’thurat di dalam applikasi mobil tersebut. Sila muat-turun dari:
http://bit.ly/mathurat
Khirulnizam - students experience in using blog as a learning tool - world co...Khirulnizam Abd Rahman
Abstract
This paper is to report a study on the students’ experience in using blog (weblog) as a learning tool. For the purpose of this study, a blog was prepared for the subject of Web Programming. This blog is a place where the lecturer posts the syllabus, lecture notes, presentations slides, computer lab manual, assignments, discussions, code samples and also announcements. The students are required to visit the blog to download the learning materials and to participate in the discussions. It is a quantitative survey to find out whether the students having a good or bad experience in using the blog. The authors also would like to know the students’ experience in using the blog; in terms of flexibility, content presentation or arrangement, communication, experience through blog, update medium, navigation and overall experience.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Chapter 5 Class File
1. 1
5.1 Class File
• Class File useful for retrieving information
about files and directories from disk
• Objects of class File do not open files or provide
any file-processing capabilities
2. 2
Creating File Objects
• Class File provides four constructors:
1. Takes String specifying name and path (location of file on
disk)
2. Takes two Strings, first specifying path and second specifying
name of file
3. Takes File object specifying path and String specifying
name of file
4. Takes URI object specifying name and location of file
• Different kinds of paths
– Absolute path – contains all directories, starting with the root
directory, that lead to a specific file or directory
– Relative path – normally starts from the directory in which the
application began executing
3. 3
Fig. 5.1 | File methods.
(Part 1 of 2)
Method Description
boolean canRead() Returns true if a file is readable by the current application; false
otherwise.
boolean canWrite() Returns true if a file is writable by the current application; false
otherwise.
boolean exists() Returns true if the name specified as the argument to the File
constructor is a file or directory in the specified path; false otherwise.
boolean isFile() Returns true if the name specified as the argument to the File
constructor is a file; false otherwise.
boolean isDirectory() Returns true if the name specified as the argument to the File
constructor is a directory; false otherwise.
boolean isAbsolute() Returns true if the arguments specified to the File constructor
indicate an absolute path to a file or directory; false otherwise.
4. 4
Fig.5.1 | File methods.
(Part 2 of 2)
Method Description
String getAbsolutePath() Returns a string with the absolute path of the file or directory.
String getName() Returns a string with the name of the file or directory.
String getPath() Returns a string with the path of the file or directory.
String getParent() Returns a string with the parent directory of the file or directory (i.e.,
the directory in which the file or directory can be found).
long length() Returns the length of the file, in bytes. If the File object represents a
directory, 0 is returned.
long lastModified() Returns a platform-dependent representation of the time at which the
file or directory was last modified. The value returned is useful only for
comparison with other values returned by this method.
String[] list() Returns an array of strings representing the contents of a directory.
Returns null if the File object does not represent a directory.
5. 5
Error-Prevention Tip 5.1
Use File method isFile to determine whether a
File object represents a file (not a directory)
before attempting to open the file.
6. 6
Demonstrating Class File
• Common File methods
– exists – return true if file exists where it is specified
– isFile – returns true if File is a file, not a directory
– isDirectory – returns true if File is a directory
– getPath – return file path as a string
– list – retrieve contents of a directory
• Separator character – used to separate directories and
files in a path
– Windows uses
– UNIX uses /
– Java process both characters, File.pathSeparator can be
used to obtain the local computer’s proper separator character
7. 7
Outline
FileDemonstration
.java
(1 of 2)
1 // Fig. 5.1: FileDemonstration.java
2 // Demonstrating the File class.
3 import java.io.File;
4
5 public class FileDemonstration
6 {
7 // display information about file user specifies
8 public void analyzePath( String path )
9 {
10 // create File object based on user input
11 File name = new File( path );
12
13 if ( name.exists() ) // if name exists, output information about it
14 {
15 // display file (or directory) information
16 System.out.printf(
17 "%s%sn%sn%sn%sn%s%sn%s%sn%s%sn%s%sn%s%s",
18 name.getName(), " exists",
19 ( name.isFile() ? "is a file" : "is not a file" ),
20 ( name.isDirectory() ? "is a directory" :
21 "is not a directory" ),
22 ( name.isAbsolute() ? "is absolute path" :
23 "is not absolute path" ), "Last modified: ",
24 name.lastModified(), "Length: ", name.length(),
25 "Path: ", name.getPath(), "Absolute path: ",
26 name.getAbsolutePath(), "Parent: ", name.getParent() );
27
Create new File object; user
specifies file name and path
Returns true if file or directory
specified exists
Retrieve name of file or directoryReturns true if name is a
file, not a directoryReturns true if name is a
directory, not a file
Returns true if path was
an absolute path
Retrieve time file or directory
was last modified (system-
dependent value)
Retrieve length of file in bytes
Retrieve path entered as a string
Retrieve absolute path of file or directoryRetrieve parent directory (path
where File object’s file or
directory can be found)
8. 8
Outline
FileDemonstration
.java
(2 of 2)
28 if ( name.isDirectory() ) // output directory listing
29 {
30 String directory[] = name.list();
31 System.out.println( "nnDirectory contents:n" );
32
33 for ( String directoryName : directory )
34 System.out.printf( "%sn", directoryName );
35 } // end else
36 } // end outer if
37 else // not file or directory, output error message
38 {
39 System.out.printf( "%s %s", path, "does not exist." );
40 } // end else
41 } // end method analyzePath
42 } // end class FileDemonstration
Returns true if File is a directory, not a file
Retrieve and display
contents of directory
9. 9
Outline
FileDemonstration
Test.java
(1 of 3)
1 // Fig. 5.2: FileDemonstrationTest.java
2 // Testing the FileDemonstration class.
3 import java.util.Scanner;
4
5 public class FileDemonstrationTest
6 {
7 public static void main( String args[] )
8 {
9 Scanner input = new Scanner( System.in );
10 FileDemonstration application = new FileDemonstration();
11
12 System.out.print( "Enter file or directory name here: " );
13 application.analyzePath( input.nextLine() );
14 } // end main
15 } // end class FileDemonstrationTest
10. 10
Outline
FileDemonstration
Test.java
(2 of 3)
Enter file or directory name here: C:Program FilesJavajdk1.5.0demojfc
jfc exists
is not a file
is a directory
is absolute path
Last modified: 1083938776645
Length: 0
Path: C:Program FilesJavajdk1.5.0demojfc
Absolute path: C:Program FilesJavajdk1.5.0demojfc
Parent: C:Program FilesJavajdk1.5.0demo
Directory contents:
CodePointIM
FileChooserDemo
Font2DTest
Java2D
Metalworks
Notepad
SampleTree
Stylepad
SwingApplet
SwingSet2
TableExample
11. 11
Outline
FileDemonstration
Test.java
(3 of 3)
Enter file or directory name here:
C:Program FilesJavajdk1.5.0demojfcJava2Dreadme.txt
readme.txt exists
is a file
is not a directory
is absolute path
Last modified: 1083938778347
Length: 7501
Path: C:Program FilesJavajdk1.5.0demojfcJava2Dreadme.txt
Absolute path: C:Program FilesJavajdk1.5.0demojfcJava2Dreadme.txt
Parent: C:Program FilesJavajdk1.5.0demojfcJava2D
12. 12
Common Programming Error 5.2
Using as a directory separator rather than in a
string literal is a logic error. A single indicates
that the followed by the next character
represents an escape sequence. Use to insert a
in a string literal.