Saturday, March 31, 2018

9 Important tips to quit your Job properly

In this article i am sharing the best tips to quit a job in the Right Way. Quitting a job is never easy. It can be nerve-wrecking walking into your boss's office to deliver the news. Maybe you hate your boss, or you just received a better offer from a competitor. Perhaps you're moving out of state, or you feel you've outgrown your role.Whatever the reason, you've decided to quit your job. And now you have to do one of the most difficult things: tell your employer.Once you know you're leaving a company, you need to think carefully about how you want to break the news.

Here are few tips to help you formally resign with class, rather than a tarnished reputation:

Tell your boss in person:

While HR will require a formal letter of resignation for their files, it's important to actually make the announcement to your employer in person. "Try to get 15 minutes on your boss's calendar right at the beginning of the day to have a personal conversation.
Keep the conversation positive, professional, and constructive. Refrain from being rude or insulting, no matter how horrible your manager was. "You never know where people are going to end up,"Most managers don't want to hear from HR that they are losing one of their staff.It's embarrassing.

Do a quick audit:


Taking a look back at the job you are thinking about leaving and accounting for all pros and cons can help you make better decisions moving forward. It's ideal to look at every job as a learning experience or stepping stone to the next opportunity.

Keep your letter simple:

Resignation letters don't need to include a drawn-out narrative of your time at the company or why you decided to leave. "It needs to be simple, straightforward, and to the point.Your name and position, a statement that you're resigning, and the date you're leaving are the only things that absolutely need to be written - but you can add a sentiment such as, "I've appreciated the opportunity to work here," if you wish.

Stay focused:

Keep your focus on your work until last day. some people tend to think they can slack off.If you are still earning a paycheck, you are still expected to perform your duties.

Time it right.

There's no magic number for how far in advance to announce your departure, but you should aim to give your employer as much time as possible to hire and train a replacement. "Some companies ask for minimum of two weeks, or longer, especially the more senior you are and the bigger projects you're working on.However, it's important to review your company's policy before resigning, as some offices force you to evacuate immediately. You don't want to go in thinking you're giving two weeks notice, only to be told you have 20 minutes.

Offer your help:

offer to help transition whatever workload you can,and also you leave detailed instructions on what you are working on and your ongoing duties for your replacement.Find out who will be taking your responsibilities and be sure to spend time waling them through the basics, so they have at least some working knowledge of how do your work.

Be gracious and thanks to everyone:

Personally thank each individually you worked for being part of the team and allowing to contribute to the source of ABC.

Stay Connected:

LinkedIn is a great way to keep up with any changes or advancements in the career of your colleagues that may be of value to you.Be sure to connect with any colleagues and management staff that you want keep in touch with before leaving.

Arrange an exit interview.

Many companies will ask to sit down with you before you leave to discuss your experiences in your current position. This allows HR to figure out why they're losing talent and where they can improve.This is your last opportunity to give your employer feedback. But, if you choose to air any grievances you couldn't (and shouldn't) write in your resignation letter, make sure you do so in a constructive manner.

Watch Video: How to Quit a Job in the Right Way?




Friday, March 30, 2018

How Spring MVC supports REST Resources?

Spring has long had some of the ingredients needed for exposing REST resources.
Starting with version 3.0, however, Spring began adding enhancements to Spring MVC
to provide first-class REST support.

Spring supports the creation of REST resources in the following ways:
  • Controllers can handle requests for all HTTP methods, including the four primary REST methods: GET, PUT, DELETE, and POST. Spring 3.2 and higher also supports the PATCH method.
  • The @PathVariable annotation enables controllers to handle requests for parameterized URLs (URLs that have variable input as part of their path).
  • Resources can be represented in a variety of ways using Spring views and view resolvers, including View implementations for rendering model data as XML,JSON, Atom, and RSS.
  • The representation best suited for the client can be chosen using Content Negotiating ViewResolver
  • View-based rendering can be bypassed altogether using the @ResponseBody annotation and various HttpMethodConverter implementations.
  • Similarly, the @RequestBody annotation, along with HttpMethodConverter
    implementations, can convert inbound HTTP data into Java objects passed in to
    a controller’s handler methods.
  • Spring applications can consume REST resources using RestTemplate.
     

Thursday, March 29, 2018

Difference Between View and Materialized View in SQL

In this post i am sharing difference between view and Managerial view in database or SQL. This is one of the popular interview question,it doesn't matter whether you are programmer,DBA,or backend developer. These SQL questions common for all. Now let us see what is view and materialized view.

View:

Views are virtual table only and run the query definition each time they are accessed. A view is also useful to hide sensitive data columns.The result is not stored any where in the disk and every time we need to fire the query when we need data.


Materialized view:

Materialized views are disk based and updated manually or using triggers, also the definition of the query will also store in the database.


Now let us see The key differences between View and Materialized view in SQL or Database:


  • The view query result is never stored in the disk or database it is only displayed but Materialized view allow the  query result on the disk.
  • .In case of view we always get latest data since view is updated each time the virtual table is used but Materialized view we need to refresh the view for getting latest data, Since it has to be updated manually.
  • Performance of view is less but Materialized view is fast processing.
  • view do not require memory space but Materialized view utilizes memory space.
  • No separate copy of table but in case of Materialized view we get physically separate copy of table
All most all applications is used views,we use views because they are more feasible, only logical representation of table data no extra space needed.Materialized views are used mostly with data warehousing or business intelligence application.




Wednesday, March 28, 2018

How to download archive of all your Facebook data?

The Facebook-Cambridge Analytica data leaks scandal has once again raised privacy fears and questions around how big companies like Facebook and Google are storing user data.Here’s a look at how to get a complete copy of all your data from Facebook.

Facebook has the option where users can download an archive of all their data from the social network. This includes all posts, photos, status updates, and all other data that Facebook has collected regarding the user.The Facebook Messenger Android app has an option, where it allows users to upload contacts to the app and also made it the default app for SMS on the phone. This permission on Android was used to scrape other data details from the phone log as well.

In order to download Facebook data go to Settings on the desktop version of the site. At the bottom of the General Account Settings page you will see an option called: “Download a copy of your Facebook data.” This is not so prominent and appears right below the settings in tiny text.

So what sort of data should you expect from this Facebook archive?

  It will will include information you added to the “About section” on the timeline from relationships to work to education to where you live, and more and any updates or changes you made. The information also includes the dates when an account was reactivated, deactivated, disabled or deleted, all store active sessions, which has date, time, device, IP address, machine cookie and browser information.

Even Ads clicked, the times, titles, etc are all shared as part of this downloaded information. The data also includes your chat history on Facebook and list of IP addresses from where a user has logged into their account.The list also mentions political and religious views in the list of information based on whether the user has shared this in their about section.

How Google knows Everything about us?

In this post you will know how google find out our data?Let us see one by one how the google find out about you? They are
 
1. MAPS:

Google knows where you have been(and for how long)

Google tracks your location every time you turn your phone on, i.e. if you have enabled the location service. It compiles that information into a timeline, which includes everywhere you have been since you first linked your google account to your phone, at what time in the day were you at different locations,and the time it look to commute between two locations.

2. Search:

Google stores every single search you have made:

Everything you search on Google across devices is stored in a separate database by the company. To get rid of that, deleting your Google search histories is not enough. You will have to go to that database from all individual devices. Further, Google analyzes your account activity to create an advertisement profile. It feeds of information like hobbies,interests,profession,gender,and age.

Apps:

Google tracks whom are you talking to on Facebook:

Every app and extension you use on Google, be it a third-pat app like Facebook or Google's own service like chrome,is listed with the company. Google stores all the information regarding the usage ofthose apps including where you use them, how frequently you use them,and in what capacity you use them.

You tube:
The YouTube videos you watch tell a lot about you:

Next, Google stores and analyzes your YouTube history. Based on the videos you watch, your religion,political leanings, economic status,personality type and behavioral traits can be inferred. For example, GOOGLE KNOWS if you are pregnant or if you are facing mental health issues. such information can be then used to manipulate user behavior online.

Gmail:

The Gmail document stores every e-mail you have sent or received, even if they have been deleted. The downloadable file lists every Google Ad you have ever clicked on and every app you have used. And let's not forget, all of this concerns a single Google account. If you have more than one Gmail IDs,double the data exploitation.

You want check it out what google has stores your data then type on the browswer as follows:
google.com/takout

Tuesday, March 27, 2018

What is Google Code Jam? How do you Get Job at Google?

Code Jam calls on programmers around the world to put their skills to the test by solving multiple rounds of algorithmic puzzles. The online rounds conclude in the World Finals, which rotates globally. In addition to being challenging and fun, Code Jam problems can help you develop your coding and programming skills.

Contestants from over 125 countries registered for the 2017 Code Jam contest. Our Code Jam and Distributed Code Jam finalists represented 15 different countries.

Code Jam is back for its 15th year! Join the Code Jam community and take on a series of challenging algorithmic puzzles for a chance to earn the coveted title of Code Jam Champion and win $15,000 at the World Finals in Toronto, Canada. Make sure to register before the Online Qualification Round begins on Friday, April 6 at 23:00 UTC to secure your spot in the competition.

Website URL: Code Jam Registration of 2018 

Flow of the contest
Code Jam consists of the following rounds:
  1. Qualification Round - in which, you must solve enough problems to clear a pre-decided threshold of points / problems solved, to progress to further rounds. This round is usually 24 hours long.
  2.  Round 1A/1B/1C - Three rounds, each of 2hr 30min take place, from which the top 1000 participants progress to Round 2.
  3.   Round 2 - This round is a 2hr 30min round too, from which the top 500 contestants proceed to Round 3.
  4.  Round 3 - The top 20 participants move on to the World Finals, and usually the top 200 participants (?) get Google Code Jam T-Shirts!
  5. World Finals - This round happens on site, at one of Google's offices. It is a 4hr contest. 

Google CodeJam provides a platform where your logical ability and mathematical approach to a problem is tested.

To prepare for GCJ 18 , first of all you should study different type of problem solving approaches like Dynamic Programming, Greedy Method, Backtracking, etc.For this you can refer Design Analysis & Algorithms By Thomas H. Cormen.

Secondly you must develop a mathematical approach for solving any problem. For this you have practice more and more problems and solve them using various mathematical approach. There are numerous theorems by which you can solve various problems in O(1) time complexity.

Here are some resources that might prove helpful:

    Codechef :  Programming Competition,Programming Contest,Online Computer Programming
   
     USACO Training Pages : Page on Delos
   
     Topcoder : TopCoder, Inc. | Home of the world's largest development community.
   
     Stackoverflow(for any programming doubts) : Stack Overflow



I'll highlight a few points to get success in the competition of 2018:

  •  DO NOT give up on a problem. Spend at least a couple of hours on a given problem. If you don't succeed , take a break and come back again and try solving it later. Keep thinking about the problem, most likely you'll stumble upon an idea. Once you get the key idea, coding it won't be too hard.
  • Try solving at least one problem every week. If you don't do this, you'll get slower as more time passes.
  • After solving the problem on your own, try going through other solutions. They are sometimes much more efficient and understanding them might be beneficial to you later.
  • You could sign up for an Algorithms course on Coursera , which might prove helpful not only for this , but also your course work if you happen to study Computer Science.
  • Try solving as many problems as possible. The more you practice, the faster and better you get.
I hope these documentation is enough who want participate in the Google Code Jam Competition in 2018. Make sure to register before the Online Qualification Round begins on Friday, April 6 at 23:00 UTC to secure your spot in the competition ALL THE BEST who is going to attend this event.

Java 8 Stream findFirst() and findAny() methods with Example

In this post you will learn finding elements in a stream based on predicate condition with the help of Stream.findFirst() and Stream.findAny() methods. Let us discuss one by one

Stream.findAny() method:
There are instances when the business specification says that any element of the stream satisfying a given criteria is to be fetched. I.e. an exact element match is not needed but any element from the satisfying set can be picked up. In such cases findAny() method is an ideal fit because once you filter the stream down to elements satisfying a particular criteria, then any element from the filtered stream can be picked up.

It is important to note that Stream.findAny() method can literally give you any element from the stream on which it is called. I.e. you should not code with an expectation that a particular value will always be returned. This non-deterministic nature of the findAny() method is very useful when executing parallel operations on a stream as it helps in performance optimization without worrying about which element will be returned.

Both findFirst() and findAny() are short-circuit method, much like short circuit AND (&&) and OR (||) operator which will not evaluate anymore element once they found one.

Stream.findAny() method returns an Optional describing some element of the stream, or an empty Optional if the stream is empty.

Optional<T> java.util.stream.Stream.findAny();


In the above statement ,
findAny() method does not take any input.
     – returns an Optional instance of type T where T is the type of the Stream on which this method is invoked.

The following example shows how to use Stream.findAny() method

Student POJO
package com.byluckysir.java8;
public class Student{
  private String name;
  private Integer age;
  public Student(String name, Integer age){
    this.name=name;
    this.age=age;
  }
  //getters and setters for name and age attributes go here
  //overridden equals() and hashcode() go here
  public String toString(){
    return "Student Name:"+this.name
      +"  Age:"+this.age;
  }
}

//FindInStrems.java
package com.byluckysir.java8.streams;
import com.byluckysir.java8.Student;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
public class FindInStreams {
  static List<Student> studentList = Arrays.asList(
    new Student("pavan", 19),
    new Student("Ramesh", 25),
    new Student("eeswar", 23),
    new Student("lakshmi", 22),
    new Student("maneesha", 21),
    new Student("rohitha", 22),
    new Student("bharat",24),
    new Student("chandana", 19));
  public static void main(String[] args) {
    Optional<Student> anyStdAbove23 = StudentList.stream()
                                       .filter(std -> std.getAge() > 23)
                                       .findAny();
    if(anyStdAbove23.isPresent()){
      System.out.println("Any Student above age 23: " + anyStdAbove23.get());
    }
  }
}

Output:
Any Student above age 23:Student Name: bharat Age:24

Stream.findFirst():

Stream.findFirst() method returns an Optional describing the first element of this stream, or an empty Optional if the stream is empty.
Optional<T> java.util.stream.Stream.findFirst();



Student class and the static Student list is the same as above example

public static void main(String[] args) {
  Optional<Student> firstEmpBelow30 = StudentList.stream()
                                      .filter(std -> std.getAge() < 20)
                                      .findFirst();
  if (firstStdBelow20.isPresent()) {
    System.out.println("First Student below 20: " + firstStdBelow20.get());
  }
}

OUTPUT:
First Student below age 20:Student Name: pavan  Age:19


Monday, March 26, 2018

TOP 5 Technologies you must learn in 2018

In this post i am sharing top 5 technologies you must learn in 2018 and these technologies will helpful to survive in IT industry next 5 years. Take a look one by one

1. Artificial Intelligence:

Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a software think intelligently, in the similar manner the intelligent humans think.

AI is accomplished by studying how human brain thinks, and how humans learn, decide, and work while trying to solve a problem, and then using the outcomes of this study as a basis of developing intelligent software and systems.The core problems of artificial intelligence include programming computers for certain traits such as:

Knowledge
Reasoning
Problem solving
Perception
Learning
Planning
Ability to manipulate and move objects

Machine learning is another core part of AI. Learning without any kind of supervision requires an ability to identify patterns in streams of inputs, whereas learning with adequate supervision involves classification and numerical regressions

Robotics is also a major field related to AI. Robots require intelligence to handle tasks such as object manipulation and navigation, along with sub-problems of localization, motion planning and mapping.


2. Big Data:
The process of storing and analysis data to make sense for the organization is called Big data. In simple terms,data which is very large in size and yet growing exponentially with time is called as Big data.The volume of data being made publicly available increases every year, too. Organizations no longer have to merely manage their own data; success in the future will be dictated to a large extent by their ability to extract value from other organizations’ data.

For any application that contains limited amount of data we normally use SQL/Oracle/ MySQL,but what in case of large applications like Facebook,Google,YouTube? This data is so large and complex that none of the traditional data management system is able to store and process it.

Facebook generates 500+ TB data per day as people upload various images,videos,posts etc..Similarly sending text/multimedia messages,updating Facebook/whatsapp status,comments etc..generates huge data.If we use traditional data processing applications(SQL/ORACLE/MySQL)to handle it, it will lead to loss of efficiency. So in order to handle exponential growth of data,data analysis becomes a required task. To overcome this problem,we use Big data. Big data includes both structured and unstructured data.

Structured Data means the data which can be stored and processed in table format is called as a structured data. it is very simple to enter, store and analyze.Example: RDBMS

Unstructured Data means the data with unknown form or structure is called as unstructured data. Example: Text files,images,videos,webpages,PDF files,PPT,social media data etc..
Semi structured Data means combination of both Structured and unstructured data.Example: XML data.

Traditional management systems and existing tools are facing difficulties to process such a big data.R is one of the main computing tool used in statistical education Research. It is also widely used for data analytics and numerical computing in scientific research.

This type of Big Data come from Social Media,E-Commerce,Share Market and Airplane etc..


3. Blockchain:

A blockchain is a digitized, decentralized, public ledger of all cryptocurrency transactions. Constantly growing as ‘completed’ blocks (the most recent transactions) are recorded and added to it in chronological order, it allows market participants to keep track of digital currency transactions without central recordkeeping. Each node (a computer connected to the network) gets a copy of the blockchain, which is downloaded automatically.

Originally developed as the accounting method for the virtual currency Bitcoin, blockchains – which use what's known as distributed ledger technology (DLT) – are appearing in a variety of commercial applications today. Currently, the technology is primarily used to verify transactions, within digital currencies though it is possible to digitize, code and insert practically any document into the blockchain. Doing so creates an indelible record that cannot be changed; furthermore, the record’s authenticity can be verified by the entire community using the blockchain instead of a single centralized authority.


4. Data Science:

 Data Science is the future of Artificial Intelligence. Therefore, it is very important to understand what is Data Science and how can it add value to your business.

This data is generated from different sources like financial logs, text files, multimedia forms, sensors, and instruments. Simple BI tools are not capable of processing this huge volume and variety of data. This is why we need more complex and advanced analytical tools and algorithms for processing, analyzing and drawing meaningful insights out of it.


Why Data Science is now such a Hot career now?

 What are some examples of data science?

Google.
They are the definition of data science. Everything they do is data driven from their search engine (google.com), through their YouTube efforts, maximization of ad revenue, etc. Even their HR team is using the scientific method to evaluate strategies that make the employees feel better at work so they can be more productive. Google is not the best place to work just by chance.
Amazon.
Each product recommendation that you get comes from Amazon’s sophisticated data science algorithms. Actually, Amazon has implemented an algorithm that can predict with some certainty if you are going to buy a certain product. If the probability is high enough, they move it to the storage unit closest to you so when you actually purchase it, it could be delivered the same day.
Facebook.
Facebook is generating ad revenue like crazy since it has all that personal data for all its users. Since you interact with the platform, they know if you prefer cat videos or dog videos, so they know if you are a cat person or a dog person. They know what sports you are into, what food you prefer, the amount of money that you are willing to spend online. In this way, they can target their users in extraordinary ways, thus companies just love to use it as a medium.

That being said, not only huge companies have a data science division. Small businesses, blogs, local businesses,etc. use Google analytics for their needs and have seen huge gains from it. This is also a part of data science. You don’t need to be doing machine learning to monetize on data science.

Now, if your competitors are relying on data-driven decision making and you aren’t, they will surpass you and steal your market share. Therefore, you must either adapt and employ data science tools and techniques, or you will simply be forced out of business.


5. Cloud Computing:

Actually, Small as well as some large IT companies follows the traditional methods to provide the IT infrastructure. That means for any IT company, we need a Server Room that is the basic need of IT companies.

In that server room, there should be a database server, mail server, networking, firewalls, routers, modem, switches, QPS (Query Per Second means how much queries or load will be handled by the server) , configurable system, high net speed and the maintenance engineers.

To establish such IT infrastructure, we need to spend lots of money. To overcome all these problems and to reduce the IT infrastructure cost, Cloud Computing comes into existence.

The goal of cloud computing is to allow users to take benefit from all of these technologies, without the need for deep knowledge about or expertise with each one of them. The cloud aims to cut costs, and helps the users focus on their core business instead of being impeded by IT obstacles.The main enabling technology for cloud computing is virtualization. Virtualization software separates a physical computing device into one or more "virtual" devices, each of which can be easily used and managed to perform computing tasks. With operating system–level virtualization essentially creating a scalable system of multiple independent computing devices, idle computing resources can be allocated and used more efficiently. Virtualization provides the agility required to speed up IT operations, and reduces cost by increasing infrastructure utilization. Autonomic computing automates the process through which the user can provision resources on-demand. By minimizing user involvement, automation speeds up the process, reduces labor costs and reduces the possibility of human errors.










What is MongoDB? How MongoDB is changing The Business of BIG DATA?

In this session you will learn what is MongoDB? How MongoDB is changing the business of Big Data.MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling.MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time.MongoDB is a document oriented database. It is an open source product, developed and supported by a company named 10gen.

MongoDB’s document model is simple for developers to learn and use, while still providing all the capabilities needed to meet the most complex requirements at any scale. We provide drivers for 10+ languages, and the community has built dozens more.

How MongoDB is changing the Business of Big Data?

Modern data is vast, unstructured, and sometimes unwieldy. It’s big and complicated, and we have big expectations for what it can do—and trying to store, process, and analyze all of it has led to the development of NoSQL databases.

The leading NoSQL database, MongoDB, has come out ahead in the field for a few reasons. It’s the database component used in the MEAN software stack, it’s open-source, and it’s cross-platform compatible. It also has some impressive built-in features that make it an excellent choice for businesses that need fast, flexible access to their data, whether it’s to make real-time, on-the-fly decisions, or to create tailored, data-driven experiences for users. It’s not just limited to the MEAN stack, either—it’s compatible with .NET applications, the Java platform, and more. It’s been used by organizations like Metlife, ADP, The Weather Channel, Bosch, and Expedia.

MongoDB is able to meet new data challenges that are difficult (if not impossible) to accomplish well with relational databases. MongoDB enables you to:

1. Store large volumes of data that often have little to no structure. Relational databases store structured data like a phonebook. But for growing, unstructured data—for example, a customer’s preferences, location, past purchases, and Facebook likes—a NoSQL database sets no limits, and allows you to add different types of data as your needs change. Because MongoDB is flexible and document-based, you can store these JSON-like binary data points (referred to as BSON) in one place without having to define what “types” of data those are in advance.

2. Make the most of cloud computing and storage. Cloud-based storage is an excellent cost-saving solution, but requires data to be easily spread across multiple servers to scale up. MongoDB can load a high volume of data and give you lots of flexibility and availability in a cloud-based environment, with built-in sharding solutions that make it easy to partition and spread out data across multiple servers.
3. Develop and release quickly. If you’re developing within two-week Agile sprints, cranking out quick iterations, or needing to make frequent updates to the data structure without a lot of downtime between versions, modifying a relational database will slow you down. With MongoDB’s dynamic schemas, you can try new things, and fast. Your data doesn’t need to be prepped ahead of time, and your team can incorporate anything new, quickly, and at a lower cost.
4. Scale database architecture efficiently and inexpensively. With MongoDB, it’s easy to spread data out across commodity hardware on-site or in the cloud without needing additional software.

Local variable in Java With Examples

In this post you will learn how to declare local variable and their behavior in the java program.In Java, there are many places to declare variables. You can declare them at the start of the program, within the main method, inside classes, and inside methods or functions. Depending on where they are defined, other parts of your code may or may not be able to access them.

 A local variable is a variable declared inside a method body, block or constructor. It means variable is only accessible inside the method, block or constructor that declared it.

Declaration of local variable:

Every local variable declaration statement is contained by a block ({ … }). We can also declare the local variables in the header of a “for” statement. In this case it is executed in the same manner as if it were part of a local variable declaration statement.

For example: for(int i=0;i<=5;i++){……}

In above example int i=0 is a local variable declaration. Its scope is only limited to the for loop.

Syntax:

methodname()
{
data type  localvarname;
-----------
-----------
}

Here method name is the name of method, Data Type refers to data type of variable like int, float etc and localvar Name is the name of local variable.

can we use local variables before they are initialized?Consider following program.

class LocalVariable
{
     public static void main(String[] args)
     {
          int a;
          System.out.println(a);
          a=10;
     }
}
If you try to compile above program, you will get a compile time error : i may not have been initialized. Because, any variable, global or local, should have some value before they are used. If you don’t initialize global variables explicitly, they take default values. But, If you don’t initialize local variables explicitly, they don’t take default values. They remain uninitialized until you initialize them explicitly. Therefore, local variables will not be having any value until they are initialized explicitly. Therefore, when you use local variables before they are initialized, you get compile time error. That’s why we can’t use local variables before they are initialized.

Note: To make the above program error free, put a=10 before System.out.println(a).

Important points to remember:

Access modifiers cannot be used for declaring local variables.
Default values are not assigned to a local variables in Java.
Local variables are declared in a blocks, methods or constructors.
Local variables are created when the block, method or constructor is started and the variable will be destroyed once it exits the block, method or constructor.

 

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...