Girl in IT-wolrd

Everything has been downloaded. Quit download loop.

10 вопросов по абстрактным классам и интерфейсам с собеседований по Java

Original site: javarush

Абстрактные классы и интерфейсы очень популярны во всех объектно-ориентированных языках программирования. И практически на каждом собеседовании по Java попадается хотя бы один вопрос на эту тему. Интерфейсы упоминаются чаще, из-за их популярности среди проектировщиков ПО, но время от времени встречаются и вопросы по абстрактным классам. Последние чаще задают претендентам на должность джуниор-разработчиков, скажем, с не более чем двухлетним опытом разработки на Java, в то время как вопросы по интерфейсам чаще всего встречаются при собеседовании тех, чей опыт уже перевалил за четыре года. В основном, их задают вместе с другими вопросами по паттернам проектирования Java, например, по паттернам Decorator (Декоратор) или Factory (Фабрика).

10 вопросов по абстрактным классам и интерфейсам с собеседований по Java - 1

В этой статье мы рассмотрим частые вопросы по абстрактным классам и интерфейсам, которые задавались на собеседованиях по Java разного уровня. Большинство из них не должно представлять сложности даже для начинающего Java-программиста. В основном это вопросы на чистое знание, но некоторые из них, например, о различиях между абстрактными классами и интерфейсами в Java или о том, когда лучше предпочесть абстрактный класс интерфейсу, могут оказаться достаточно непростыми. Предлагаем вам десяток интересных вопросов по теме.

Read more of this post

Справочник по Java Collections Framework 

Данная публикация не является полным разбором или анализом (не покрывает пакет java.util.concurrent). Это, скорее, справочник, который поможет начинающим разработчикам понять ключевые отличия одних коллекций от других, а более опытным разработчикам просто освежить материал в памяти.

Что такое Java Collections Framework?

Java Collection Framework — иерархия интерфейсов и их реализаций, которая является частью JDK и позволяет разработчику пользоваться большим количесвом структур данных из «коробки».

Базовые понятия

На вершине иерархии в Java Collection Framework располагаются 2 интерфейса: Collection и Map. Эти интерфейсы разделяют все коллекции, входящие во фреймворк на две части по типу хранения данных: простые последовательные наборы элементов и наборы пар «ключ — значение» (словари).

image

Collection — этот интерфейс находится в составе JDK c версии 1.2 и определяет основные методы работы с простыми наборами элементов, которые будут общими для всех его реализаций (например size(), isEmpty(), add(E e) и др.). Интерфейс был слегка доработан с приходом дженериков в Java 1.5. Так же в версии Java 8 было добавлено несколько новых метода для работы с лямбдами (такие как stream(), parallelStream(), removeIf(Predicate<? super E> filter) и др.).

Writing feedback to colleague. Useful phrases, links.

Now working in this big 1000+ employee company, so we are required to write feedbacks to each other every half of year. Here is my collection of links to useful phrases where you can pick up on some nice smart words, so this “Bill is cool” can become something like “Bill establishes effective working relationships”.

Here it goes:
1) SAMPLE PERFORMANCE COMMENTS
2) 100 USEFUL PHRASES FOR PERFORMANCE REVIEWS
3) 240+ Performance Evaluation Phrases – Sample Performance Review Statements
4) 94 Example Performance Review Phrases and Comments for Skills and Competencies

Gonna put some of them beneath, just in case these sites will go down in future.

READ MORE if you are not scared of A LOT OF TEXT   Read more of this post

Java Interview. Autoboxing.

1 Что такое autoboxing?
Автоупаковка это механизм неявной инициализации объектов классов-оберток (Byte, Short, Character, Integer, Long, Float, Double) значениями соответствующих им исходных примитивных типов (соотв. byte, short, char, int, long, float, double), без явного использования конструктора класса.
Автоупаковка происходит при прямом присвоении примитива — классу-обертке (с помощью оператора”=”), либо при передаче примитива в параметры метода (типа «класса-обертки»). Автоупаковке в «классы-обертки» могут быть подвергнуты как переменные примитивных типов, так и константы времени компиляции(литералы и final-примитивы). При этом литералы должны быть синтаксически корректными для инициализации переменной исходного примитивного типа.
Read more of this post

Tomcat Interview Questions & Answers

1) Explain what is Jasper?

  • Jasper is a Tomcat’s JSP engine
  • It parses JSP files to compile them into JAVA code as servlets
  • At runtime, Jasper allows to automatically detect JSP file changes and recompile them

2) Mention what is the output of select * from tab?

It displays the default tables in the database

3) Explain how you can configure Tomcat to work with IIS and NTLM?

You have to follow the standard instructions for when the isapi_redirector.dll

Configure IIS to use “integrated windows security”

Ensure that in the server.xml you have disable tomcat authentication

Read more of this post

OOPs Interview Questions & Answers

1. What is OOPS?

OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.

2. Write basic concepts of OOPS?

Following are the concepts of OOPS and are as follows:.

  1. Abstraction.
  2. Encapsulation.
  3. Inheritance.
  4. Polymorphism.

Read more of this post

Design Patterns – MVC Pattern

MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application’s concerns.

  • Model – Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes.
  • View – View represents the visualization of the data that model contains.
  • Controller – Controller acts on both model and view. It controls the data flow into model object and updates the view whenever data changes. It keeps view and model separate.

Read more of this post

Design Patterns. Behavioral.

Behavioral Design Patterns

1. Template Method Pattern
2. Mediator Pattern
3. Chain of Responsibility Pattern
4. Observer Pattern
5. Strategy Pattern
6. Command Pattern
7. State Pattern
8. Visitor Pattern
9. Interpreter Pattern
10. Iterator Pattern
11. Memento Pattern

Read more of this post

Design Patterns. Structural.

Structural Design Patterns

1. Adapter Pattern
2. Composite Pattern
3 .Proxy Pattern
4. Flyweight Pattern
5. Facade Pattern
6. Bridge Pattern
7. Decorator Pattern

Read more of this post

Design Patterns – Creational.

Creational:

1. Factory Pattern
2. Abstract Factory Pattern
3. Singleton Pattern
4. Builder Pattern
5. Prototype Pattern

Read more of this post

Design Patterns

Creational Design Patterns

1. Factory Pattern
2. Abstract Factory Pattern
3. Singleton Pattern
4. Builder Pattern
5. Prototype Pattern

Structural Design Patterns

1. Adapter Pattern
2. Composite Pattern
3 .Proxy Pattern
4. Flyweight Pattern
5. Facade Pattern
6. Bridge Pattern
7. Decorator Pattern

Behavioral Design Patterns

1. Template Method Pattern
2. Mediator Pattern
3. Chain of Responsibility Pattern
4. Observer Pattern
5. Strategy Pattern
6. Command Pattern
7. State Pattern
8. Visitor Pattern
9. Interpreter Pattern
10.Iterator Pattern
11. Memento Pattern

Java Interview Q&A. Exception Handling.[52-81/240]

52) What is an exception in java?
In java exception is an object. Exceptions are created when an abnormal situations are arised in our program. Exceptions can be created by JVM or by our application code. All Exception classes are defined in java.lang. In otherwords we can say Exception as run time error. Read more of this post

Java Interview Q&A.Coding Standards.[26-51/240]

Core java Interview questions on Coding Standards

26) Explain Java Coding Standards for classes or Java coding conventions for classes?
Sun has created Java Coding standards or Java Coding Conventions . It is recommended highly to follow java coding standards.
Classnames should start with uppercase letter. Classnames names should be nouns. If Class name is of multiple words then the first letter of inner word must be capital letter.
Ex : Employee, EmployeeDetails, ArrayList, TreeSet, HashSet
Read more of this post

Java Interview Q&A. Java Core.[1-25/240]

This post opens series of posts about Java Core Interview Questions and Answers.

1) what are static blocks and static initializers in Java ?
Static blocks or static initializes are used to initialize static fields in java. we declare static blocks when we want to initialize static fields in our class. Static blocks gets executed exactly once when the class is loaded . Static blocks are executed even before the constructors are executed.

2) How to call one constructor from the other constructor ?
With in the same class if we want to call one constructor from other we use this() method. Based on the number of parameters we pass appropriate this() method is called.
Restrictions for using this method :
1) this must be the first statement in the constructor
2)we cannot use two this() methods in the constructor

Read more of this post

Вопросы на интервью по технологиям Java Spring и Hibernate

1. Объясните суть паттерна DI или IoC

Dependency injection (DI) – паттерн проектирования и архитектурная модель, так же известная как Inversion of Control (IoC). DI описывает ситуацию, когда один объект реализует свой функционал через другой объект. Например, соединение с базой данных передается конструктору объекта через аргумент, вместо того чтобы конструктор сам устанавливал соединение. Термин “dependency injection” немного неправильный, т.к. внедряются не зависимости, а функциональность или ресурсы. Существуют три формы внедрения (но не типа) зависимостей: сэттер, конструктор и внедрение путем интерфейса.
DI – это способ достижения слабой связанности. IoC предоставляет возможность объекту получать ссылки на свои зависимости. Обычно это реализуется через lookup-метод. Преимущество IoC в том, что эта модель позволяет отделить объекты от реализации механизмов, которые он использует. В результате мы получаем большую гибкость как при разработке приложений, так и при их тестировании.  Read more of this post

69 Spring Interview Questions and Answers

Spring overview

1. What is Spring?

Spring is an open source development framework for Enterprise Java. The core features of the Spring Framework can be used in developing any Java application, but there are extensions for building web applications on top of the Java EE platform. Spring framework targets to make Java EE development easier to use and promote good programming practice by enabling a POJO-based programming model.

2. What are benefits of Spring Framework?

  • Lightweight: Spring is lightweight when it comes to size and transparency. The basic version of spring framework is around 2MB.
  • Inversion of control (IOC): Loose coupling is achieved in Spring, with the Inversion of Control technique. The objects give their dependencies instead of creating or looking for dependent objects.
  • Aspect oriented (AOP): Spring supports Aspect oriented programming and separates application business logic from system services.
  • Container: Spring contains and manages the life cycle and configuration of application objects.
  • MVC Framework: Spring’s web framework is a well-designed web MVC framework, which provides a great alternative to web frameworks.
  • Transaction Management: Spring provides a consistent transaction management interface that can scale down to a local transaction and scale up to global transactions (JTA).
  • Exception Handling: Spring provides a convenient API to translate technology-specific exceptions (thrown by JDBC, Hibernate, or JDO) into consistent, unchecked exceptions.

Read more of this post

Reveal.js – new presentations look

Онлайн презентації в декількох вимірах. Дуже зручний фреймоворк з простим юаєм від Hakim El Hattab .
Демо можна подивитися тут: http://lab.hakim.se/reveal-js/
create-an-html5-presentation-with-revealjs
Знайти всю інфу на гутхабі тут: https://github.com/hakimel/reveal.js
Read more of this post

Adding an existing project to GitHub using the command line

Create New Repository drop-down

  1. Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after you
    r project has been pushed to GitHub.
  2. Open Git Bash.
  3. Change the current working directory to your local project.

Read more of this post

Protected: Google Interview

This content is password protected. To view it please enter your password below:

Google Polymer [10 Google Polymer Tutorials – From Basic To Advanced]

Learn complete Google Polymer with these tutorial series that take you from beginner to advanced level.

Google Polymer has taken component-based software engineering to a whole new level. The Polymer library makes it faster and easier to build spectacular applications, and since it has been built on the Web Components, it provides us with new composability over the web.

If you are a fan of material design, then you might already know that Polymer played a key role in material design development. Although both Polymer and Material design are still “under development”, what has already been made available to designers and developers is nothing less than amazing. Thanks to Polymer, we don’t have to worry about browser support since Polymer provides us with a set of “polyfills” that are easily compatible with non-compliant browser.

Since this is a new-age technology that has added an interesting twist to development, it becomes crucial for every futuristic-minded programmer to learn whatever there is to know about Google Polymer.js. Here are a few resources that should help you on your way to mastering the Polymer.

Level Up Tuts Polymer Tutorial

Level UpTuts has always done a great job when it comes to “instructional documentation”. With the Polymer Tutorials you can start as a beginner by learning what Polymer is, how to install it, how to create your first element, and so on. Then you can move on to more complicated techniques such as binding and iteration, layout attributes, using core elements, and material designing with paper elements.
Read more of this post