Skip to content

Instantly share code, notes, and snippets.

View GlebGomenyuk's full-sized avatar

Gleb Gomenyuk GlebGomenyuk

View GitHub Profile
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class DbProperties {
private String url;
private String user;
private String password;
public DbProperties() {
@GlebGomenyuk
GlebGomenyuk / Main
Created March 8, 2020 21:55
HWJAVAPRO2_3
import java.io.*;
import java.lang.reflect.Field;
class SaveField implements Serializable {
int a = 12;
@Save
String b = "qwerty";
int c = 13;
@Save
boolean e = true;
@GlebGomenyuk
GlebGomenyuk / Main
Created March 8, 2020 21:55
HWJAVAPRO2_3
import java.io.*;
import java.lang.reflect.Field;
class SaveField implements Serializable {
int a = 12;
@Save
String b = "qwerty";
int c = 13;
@Save
boolean e = true;
@GlebGomenyuk
GlebGomenyuk / Main
Created March 8, 2020 21:55
HWJAVAPRO2_3
import java.io.*;
import java.lang.reflect.Field;
class SaveField implements Serializable {
int a = 12;
@Save
String b = "qwerty";
int c = 13;
@Save
boolean e = true;
@GlebGomenyuk
GlebGomenyuk / Main
Created March 8, 2020 21:52
HWJAVAPRO2_1
import java.io.FileWriter;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Scanner;
@MyAnotation(path="D:\\file.txt")
public class TextContainer {
Scanner scanner = new Scanner(System.in);
String text = scanner.nextLine();
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
public @interface AnotationTest {
int a();
int b();
<%@ page import="java.util.concurrent.atomic.AtomicInteger" %>
<%@ page import="java.util.ArrayList" %><%--
Created by IntelliJ IDEA.
User: Gleb
Date: 07.03.2020
Time: 0:33
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
package com.g;
import java.util.List;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import Exception.MyDelException;
import Exception.MyException;
package com.g;
public interface Foenkom {
public Student[] youAreInTheArmia();
}
@GlebGomenyuk
GlebGomenyuk / Group
Created January 28, 2020 13:23
hw3_1
package com.g;
import java.util.Arrays;
import Exception.MyDelException;
import Exception.MyException;
import Exception.MyserchExeption;
public class Group {