FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hello-java/basic/c10_extras/Extras.java at main · mouredev/hello-java · GitHub
mouredev
/
hello-java
Public
Notifications
You must be signed in to change notification settings
Fork
413
Star
4.5k
Code
Issues
0
Pull requests
3
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
hello-java
/
basic
/
c10_extras
/
Extras.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (35 loc) · 960 Bytes
Breadcrumbs
hello-java
/
basic
/
c10_extras
/
Extras.java
Copy path
File metadata and controls
54 lines (35 loc) · 960 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package
basic
.
c10_extras
;
/*
Clase 74 - Extras
Vídeo: https://youtu.be/JOAqpdM36wI?t=30409
*/
import
basic
.
c08_oop
.
Classes
;
import
basic
.
c08_oop
.
Person
;
import
java
.
util
.
Scanner
;
//import basic.c08_oop.*;
public
class
Extras
{
static
String
globalName
=
"mouredev"
;
public
static
void
main
(
String
[]
args
) {
// Extras
// null
String
name
=
"Brais"
;
name
=
null
;
if
(
name
!=
null
) {
System
.
out
.
println
(
name
.
toLowerCase
());
}
// import
new
Person
(
"Brais"
,
18
,
"1"
);
new
Classes
();
// Scanner
var
scanner
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"Introduce tu edad: "
);
var
age
=
scanner
.
nextInt
();
System
.
out
.
println
(
"La edad es: "
+
age
);
// Scope: variables globales y locales
test
();
// static
}
public
static
void
test
() {
System
.
out
.
println
(
globalName
);
}
}
Back
|
FazBrowse Home
|
New Git URL