Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
First_git
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rawan.salameh
First_git
Commits
0d2187ec
Commit
0d2187ec
authored
Nov 04, 2025
by
rawan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
step4
parent
5ce7a1bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
PoliceThread.java
src/hacker/PoliceThread.java
+24
-1
No files found.
src/hacker/PoliceThread.java
View file @
0d2187ec
package
hacker
;
package
hacker
;
public
class
PoliceThread
{
public
class
PoliceThread
extends
Thread
{
public
PoliceThread
()
{
this
.
setName
(
this
.
getClass
().
getSimpleName
());
}
public
void
run
()
{
for
(
int
i
=
10
;
i
>=
0
;
i
--)
{
try
{
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
//Prints the remaining time on the screen
System
.
out
.
println
(
"Police arrive in "
+
i
+
" sec"
);
}
//
System
.
out
.
println
(
" Game over for you hackers"
);
System
.
exit
(
0
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment