This file contains hidden or 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.Random; | |
/** | |
* Created by Ilya Vasilchenko on 15.03.2016. | |
*/ | |
public class Animals { | |
private boolean woofOrMeaw; | |
private boolean isLikeCombineFood; | |
private boolean isHungry; | |
public Animals() { |
This file contains hidden or 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.Random; | |
/** | |
* Created by Ilya Vasilchenko on 13.03.2016. | |
*/ | |
public abstract class Animal { | |
protected String name; | |
protected int height; | |
protected int speed; | |
protected int jumpHeight; |
This file contains hidden or 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 org.via; | |
import org.via.collection.UsersList; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
@Path("/count") |
This file contains hidden or 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 ru.javacourse; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: IVasilchenko |
This file contains hidden or 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 helloCalculator; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
public class Main{ | |
public static void main(String[] args) { | |
SimpleCalculator frame = new SimpleCalculator("MegoCalc by DScoder"); |
This file contains hidden or 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 helloCalculator; | |
import java.awt.*; | |
public class Main{ | |
public static void main(String[] args) { | |
SimpleCalculator t = new SimpleCalculator("MegoCalc by DScoder"); | |
t.setDefaultCloseOperation(t.EXIT_ON_CLOSE); | |
t.setBounds(100, 100, 300, 250); |
This file contains hidden or 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 queue; | |
import java.util.ArrayList; | |
public class GenMethods { | |
public static <E> void addElement(E x, ArrayList<E> y){ | |
int endSize = 3; |
This file contains hidden or 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 myhomework; | |
public class Lesson { | |
private String name; | |
private Week weekDay; | |
public Lesson(){} | |
public Lesson(String name, Week weekDay){ |
This file contains hidden or 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 strings; | |
public class Main { | |
public static void main(String args[]) { | |
String s = new String("Внутри строки разрешается использовать переносы на новую строку. " + | |
"Но литерные константы с такими переносами запрещены, и надо ставить" + | |
" управляющую последовательность."); | |
System.out.println("Количество слов в строке = " + s.split(" +").length); //В идеале сделать .trim() со строкой | |
System.out.println("Количество символов в строке = " + s.length()); |
This file contains hidden or 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 company; | |
public class Order extends Product { | |
private int toys; | |
private int iceCream; | |
Order(int toys, int iceCream){ | |
this.toys = toys; | |
this.iceCream = iceCream; |
NewerOlder