Java interview questions | static keyword [Answers with examples]

preview_player
Показать описание
static keyword

Java interview questions | static keyword [Answers with examples]

In this video we will respond to several Java interview questions which are related to static keyword.

0:00 - Intro
0:24 - What is a static variable?
1:18 - Can local variable be static?
1:50 - What is a static method?
2:12 - Can we override or overload static methods?
2:36 - Can we declare static methods in interfaces?
3:09 - Can we call non-static method from static one?
3:46 - Can we access non-static variables from static methods?
4:23 - Why main method is declared as static?
4:50 - Can constructors be static?
5:24 - Can abstract methods be static?
5:53 - What is a static block?
6:45 - What will happen if a runtime exception is thrown from static initialization block?
7:07 - Can classes be static?
7:24 - What are static imports?
8:12 - Example 1
8:50 - Example 2
9:20 - Summary

Best books for programming:
Head First Design Patterns: A Brain-Friendly Guide

Clean Code: A Handbook of Agile Software Craftsmanship

Cracking the Coding Interview: 189 Programming Questions and Solutions

Effective Java

Good laptops for programming:
Lenovo ThinkPad L14 1st Gen 20U5000UUS Model - AMD Ryzen 7 Pro 4750U - 256 GB SSD – 8GB RAM - AMD Radeon Graphics

Lenovo ThinkPad T460s (20F9-0038US) Intel Core i5-6300U, 8GB RAM, 256GB SSD

Lenovo ThinkPad E15 Home and Business Laptop (Intel i3-10110U 2-Core, 16GB RAM, 512GB SATA SSD, Intel UHD, 15.6" Full HD (1920x1080)) with Hub

#AcingProgrammingInterview #JavaInterviewQuestions #StaticKeyword
Рекомендации по теме