This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* package whatever; // don't place package name! */ | |
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
/* Name of the class has to be "Main" only if the class is public. */ | |
class LongEquals | |
{ | |
public static void main (String[] args) throws java.lang.Exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Curso { | |
// ... todo el código anterior | |
// imprime el nombre de los alumnos inscriptos | |
public void inscriptos() { | |
// Cómo funciona el for: https://www.programarya.com/Cursos/Java/Ciclos/Ciclo-For | |
for(int i=0; i<delAlumno.size(); i++) { | |
// Obtiene el objeto Inscripcion almacenado en la posición i del ArrayList | |
// Por cada ciclo del for tendremos un i que irá desde 0 hasta el tamaño de la lista-1: | |
// -1 porque la condición del medio "i<delAlumno.size()" hará que el for pare cuando i sea igual al |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("### Cursos ###"); | |
System.out.println("# Creando profesores..."); | |
Profesor wilkinson = new Profesor("Wilkinson"); | |
Profesor fulano = new Profesor("Fulano de Tal"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vector { | |
private int x = 0; | |
private int y = 0; | |
public Vector(int x, int y) { | |
this.x = x; | |
this.y = y; | |
} | |
public void setX(int x) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface I1 { | |
// Muestra los valores de todos los atributos que conforman el objeto del que | |
// se trate | |
public void mostrarDatos(); | |
} | |
class D1 implements I1 { | |
protected Integer x; | |
// Registra la cantidad de objetos C1 creados | |
// Debe ser static porque es un contador, y todas las instancias deben ver el |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C { | |
/** | |
* throws me sirve para indicar en un método que este es capaz de lanzar una | |
* Exception del tipo declarado después de 'throws'. En este caso, este método | |
* es capaz de lanzar una excpeción del tipo Exception (padre de todas las | |
* excepciones). | |
*/ | |
public void lanzaExcepcion() throws Exception { | |
throw new Exception("Se rompio todo"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
public void algo() { | |
System.out.println("A "); | |
} | |
} | |
interface iB { | |
public void algo(); | |
public void hace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var basename = require('path').basename; | |
var debug = require('debug')('metalsmith-markdown'); | |
var dirname = require('path').dirname; | |
var extname = require('path').extname; | |
var marked = require('marked'); | |
/** | |
* Expose `plugin`. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// we would like you to use debug | |
var debug = require('debug')('metalsmith-myplugin'); | |
var multimatch = require('multimatch'); | |
// Expose `plugin`. | |
module.exports = plugin; | |
function plugin(opts){ | |
opts.pattern = opts.pattern || []; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author: Alan Boglioli <alan.boglioli@gmai.com> | |
* Last modification: 15/02/2017 | |
* Instructions: | |
* - 1st: You have to go to the channel where you want to get its subscriptions | |
* - 2nd: Click in 'Subscriptions' (to get subscriptions from the other channel) | |
* - 3rd: Scroll down until the bottom (to list all the channels) | |
*/ | |
// PASTE THIS CODE IN YOUR CONSOLE (Ctrl+Shift+I) |