Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit274feee

Browse files
committed
Se agrego codigo fuente de tutos java
1 parent53bb2a2 commit274feee

File tree

7 files changed

+192
-0
lines changed

7 files changed

+192
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
packagepaquete;
2+
3+
publicclassBeansPrincipal {
4+
5+
publicstaticvoidmain(String[]args) {
6+
7+
JavaBeansobj=newJavaBeans();
8+
9+
obj.setUsuario("jean@gmail.com");
10+
obj.setPassword("esta es una contraseña");
11+
obj.setCodigo(121);
12+
13+
System.out.println(obj.getUsuario());
14+
System.out.println(obj.getPassword());
15+
System.out.println(obj.getCodigo());
16+
17+
}
18+
19+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
packagepaquete;
2+
3+
//Creado Por: Jean Bernuy
4+
5+
publicclassConstructores {
6+
intidUsuario;
7+
Stringusuario;
8+
Stringpassword;
9+
10+
/*public Constructores(){
11+
idUsuario= 1015;
12+
usuario="jean@gmail.com";
13+
password="jean2";
14+
15+
mostrar();
16+
17+
}*/
18+
publicConstructores(){}
19+
20+
publicConstructores(intidUsuario){
21+
this.idUsuario=idUsuario;
22+
usuario="jean@gmail.com";
23+
password="jean2";
24+
25+
mostrar();
26+
27+
}
28+
publicConstructores(intidUsuario,Stringusuario){
29+
this.idUsuario=idUsuario;
30+
this.usuario=usuario;
31+
password="jean2";
32+
33+
mostrar();
34+
35+
}
36+
publicvoidmostrar(){
37+
System.out.println(idUsuario);
38+
System.out.println(usuario);
39+
System.out.println(password);
40+
System.out.println();
41+
}
42+
43+
publicstaticvoidmain(String[]args) {
44+
Constructorest=newConstructores();
45+
Constructorest2=newConstructores(1120);
46+
Constructorest3=newConstructores(1123,"jean3@gmail.com");
47+
48+
}
49+
50+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
packagepaquete;
2+
3+
publicclassHolaMundo {
4+
5+
/**
6+
* Creado Por: Jean Bernuy
7+
*/
8+
publicstaticvoidmain(String[]args) {
9+
10+
/* Tipo de variables
11+
String texto="";
12+
double var;
13+
int var1;
14+
char var2;
15+
boolean var3;
16+
long var4;
17+
short var5;
18+
*/
19+
20+
System.out.println("Hola Mundo..." );
21+
22+
23+
}
24+
25+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
packagepaquete;
2+
importjava.io.*;
3+
4+
publicclassIOdeDatos {
5+
6+
publicstaticvoidmain(String[]args)throwsException {
7+
Stringtexto;
8+
9+
//Clase BufferedReader
10+
InputStreamReaderflujo=newInputStreamReader(System.in);
11+
BufferedReadercaracteres=newBufferedReader(flujo);
12+
13+
System.out.println("Ingrese una palabra");
14+
texto=caracteres.readLine();
15+
16+
System.out.println(texto);
17+
18+
//Clase PrintStrem
19+
PrintStreamsalida=newPrintStream(System.out);
20+
salida.println("Esta es la clase PrintStream");
21+
22+
}
23+
24+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
packagepaquete;
2+
3+
4+
publicclassJavaBeans {
5+
6+
publicStringusuario;
7+
privateStringpassword;
8+
privateintcodigo;
9+
10+
publicvoidsetUsuario(Stringusuario){
11+
this.usuario=usuario;
12+
}
13+
publicStringgetUsuario(){
14+
returnusuario;
15+
}
16+
17+
publicStringgetPassword() {
18+
returnpassword;
19+
}
20+
publicvoidsetPassword(Stringpassword) {
21+
this.password =password;
22+
}
23+
publicintgetCodigo() {
24+
returncodigo;
25+
}
26+
publicvoidsetCodigo(intcodigo) {
27+
this.codigo =codigo;
28+
}
29+
30+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
packagepaquete;
2+
3+
//Creado Por: Jean Bernuy
4+
5+
publicclassObjetos {
6+
7+
publicstaticvoidmain(String[]args) {
8+
9+
//varibles
10+
11+
/*String nombre="bicicleta";
12+
String color="azul";
13+
int codigo= 1001;
14+
15+
String nombre2="moto";
16+
String color2="negro";
17+
int codigo2=1002;
18+
*/
19+
20+
Tiendat;
21+
t=newTienda();
22+
t.nombre="bicicleta";
23+
t.color="azul";
24+
t.codigo=1001;
25+
26+
Tiendat2=newTienda();
27+
t2.nombre="moto";
28+
t2.color="rojo";
29+
t2.codigo=1002;
30+
31+
Tiendat3=newTienda();
32+
t3.nombre=" jose";
33+
34+
}
35+
36+
}

‎tutoriales-codigo-java/Tienda.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
packagepaquete;
2+
3+
publicclassTienda {
4+
5+
Stringnombre;
6+
Stringcolor;
7+
intcodigo;
8+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp