Sei sulla pagina 1di 18

https://bit.

ly/

condition(? (is it done))

A thread is an independent path of execution within a program

java IDE
is a tools we need to build java application/programs

jre and jdk are two parts used to create and run java application

jdk provides tools required to create java apps

compile--pile(a heap of things laid or lying one on top of another.) +com(together)

java uses an abstraction called byte codes thats platform independent


it allows us to not be tied to a particular host environment

abs-away tract-pull abstract-pull away


pull away what --can be a class,method

jre provides what we need in order for our java apps


byte code to execute in any host environment

platform--plat- flat form-shape


debug--remove bug(error)

IDE-type,compile,debug everything in one place

wizard --a help feature of a software package that automates complex tasks by
asking the user a series of easy-to-answer questions.

startup of your application must be in a class that has


member called main

System: a group of related parts that move/work together

System.out.println("soham "); //mechanism in java to print things out to the


console

comment doesnt end until we get to */

there is a utility called java doc that allow us to generate documentation using
special comment format
allow basically to write your code documentation right inside sc and when you run
java doc utility n if you follow appropriate structure in comment that
uility will generate documentation right from sc

four category of primitive types F CIB


byte--128 8bit
short-32k 16bit
int--214cr 32bit
long 92,233,720,368 billion or 922 billion billion(16 zeros)
float 32bit 1.4*10^-45 ----- 3.4*10^38
double 64bit 4.9*10^-324----- 1.7*10^308
primitive types are stores by value
So each primitive type variable has its own separate copy of the data.

prefix---pre--before fix--attach--- pre attach work so before attaching do work

postfix--post--after fix--attach--- after attaching do work

operator precedence PPMA

cast---pure, cut

implicit conversion
short,long---long
float,double---double
long ,double--double

explicit
int---float
loose significant digit bcz of how
it is stored

conditional logic
our program will behave differently based on differences in data values.

if statement,
which allows us to change our code path in our application
if else statement allows us to conditionally execute another statement

logical operators
that allow us to combine different conditions together.

A conditional assignment
allows us to assign a value to a variable based on the result of some condition

condi- season
claus- shut,close----closing condition/statement

block statement groups individual statements into a compound statement.

demo if else

scope:range of visibility of variable

logical operators are used to work on the results of other relational operations.

xor ---exactly one side need to be true

A while loop
allows you just to repeatedly execute some statement as long as the condition is
true.

factorial--fact--do, make

do while loop repeatedly executes a statement as long as the condition is true,


but unlike the while loop, it checks the condition at the end of the loop.
for loop
it repeatedly executes a statement as long as the condition is true and
condition is checked at the start of the loop, right? Very much like the while
loop.

for loop is more of a convenience layout for a while loop.

Array: provide an ordered collection of elements

for each--executing that loop or the statement within the loop once for each member
in the array

Switch
transfers control to a particular statement based on a value, and its purpose
is to simplify the idea of testing against multiple matches.
it support char ,integer and string

deafult --break needed if


wanted to make it another case
refactor

encapsulation, een--in, caps-box, case


in other words, how do we keep the details of our classes
inside of our classes and not the concern of those using the classes.

objects are these things that encapsulate the data, operations, and usage
semantics.
what you want to work on and how you work with it

Classes provide a structure for describing and creating our objects.

a class is a template for creating an object

as reference types, assignments cause us to point to the


same object instances as opposed to making complete copies.

null is reference literal


represent uncreated object
so it will point to null object

acessor mutator pattern--


pattern--common way to solve problem

initialization blocks.
used to share code across constructors
or
Initialization blocks allows us to run code that can be shared potentially across
constructors.

a process, technique, or system for achieving a result

signature(contructor):The key thing is that just the number and types of the
parameters have to
differ across various constructors.

constructor visibility
"Initialization Blocks". they allow us to create code that is shared across all our
constructors
What they do is they run the code as if that code were placed at the very
beginning of each constructor.

Initialization blocks run in the order they appear in the program


Static initialization blocks run when class is loaded in JVM
Instance initialization blocks run every time a new instance is created.
Instance initialization blocks run AFTER the super constructor has completed
executing and BEFORE current class constructor.
They can be used to perform operations those are common to constructors.

field initialization--->initialization block--->constructor

parameter(boundary of variable) immutability(not change)--dont change boundary


the idea that changes made to a parameter in a method are not reflected once we
exit the method.
But members of a class can be affected inside of a method.

constructor and method overloading,


the idea of having a constructor or method with differing parameters.

then finally, the idea of supporting a variable number of parameters.

overloading, the ability to use different parameter lists with a given method name
or the constructor.
eg juice with apples ,oranges etc

ganpati coin box with one hole and can increase

the signature is the thing determines which implementation of an overload gets


called

overloading allows us to pass differing parameter lists to a particular method


name.
But what happens if we don't know exactly how many parameters we need to handle in
a method

super keyword, a useful tool for accessing base class behaviors in a derived
class.

final and abstract


are used to control
class inheritance(abstract)
and
member overriding behavior(final)

Java allows one class to inherit from another class, also known as having a class
derive from another class.
What happens is that that derived class has the characteristics of the base class,
but then can add its own specializations to create more capabilities

eg copy cat earning more marks


inheritance allow us to
to perform reference type based actions without being concerned about the specific
type of the instance.
so it allows us to group actions

In Java, all
methods are automatically overridable unless you do something special to say that
you don't want them overridden.

override annotation.
And what this tells the compiler is that it is your intention to override a method
from the base class.
So the compiler will actually check and make sure that the base class has a method
with that signature.
So it's kind of just a sanity check to make sure that the method you're declaring
really does replace a
method in the base class. It has no impact on runtime. It's only used at compile
time.

every class in Java, whether it's a built-in class or one you create has the
characteristics of the Object class.

The Object class actually has methods that are defined on it, so that means that
there are
specific characteristics and capabilities that are common to all classes.

when we have a reference of a given type, we can only access the capabilities that
are visible to that reference.

clone method :allows object to create duplicate of itself


https://www.javatpoint.com/object-cloning

hashCode()
It returns back a hash code(may be object no) that's useful for working with things

like hash tables(object bucket) and other types that rely on hash tables.

scratch card

The finalize method is part of resource cleanup.


In most cases you won't do very much with the finalize method.

object class
6 methos imp

== does reference equals test


In other words, do both of these references point to the exact same object
instance

super
Like this, super provides access to the current object.
But where super is different is that super treats that object
as if it's an instance of its base class,

and it allows us to
access the features of the object as if our current class has
not overridden any of those features. And this comes in really
handy when we're implementing something in our current class and
we want to get to the features or a method exactly as they behaved in the base
class.

super 2.37 check again not understood

default, all classes can be extended, and when you inherit from a class,
you have the option of using the methods as they were written in the base class or
overriding them.

a class can change these defaults.


It can control whether it's allowed to be extended and how overriding methods works

private methods of base class cant be overridden

In the case of final, you'll generally either mark the class as final or an
individual method as final. Because once a class is final, there's no reason to
mark individual methods as final because you can't override anything if you can't
inherit from it.

Abstract allows you to require that a class be inherited and require that a
particular method be overridden
So it allowed us to define basic characteristics and behaviors in the class,
but then require specific specializations in any derived class.

when you see code like this where you've got a big condition like this and there's
individual tasks inside of there,
as a program gets more complex and you start to work inside this method, this is a
place where, very often, enhancing
or modifying the program will introduce errors because we've got a bunch of kind
of loosely related code kind of
clumped together. This is a great opportunity for us to use the class inheritance
features of Java to have a better
division of responsibilities

switch --->subclass

The key difference here is this idea of manageability and maintainability,


kind of localization of responsibility (unlike switch)

inheritance--
herit--choose, take
in--in
take in

StringBuilder class allow us to manipulate strings more efficiently

we can bring the capability of classes to primitive values using the primitive
wrapper classes.

final fields are fields that can't be changed once set

enumeration types, which allow us to define types that can only hold a finite list
of values.
en----in
numer- number
enumerate
mention (a number of things) one by one.

char type, which allowed us to work with individual characters.

String class
It stores a sequence of Unicode characters.
It stores them using the UTF-16 encoding,
which basically means that the Java String class can store pretty much any
character
you're likely to ever want to work with.

string literal in ""


In simple terms java literals are the constant values which can be assigned to
variables.
Literals are data items that are fixed data values.

Example :

Int A;

A=20;

In this above declaration�. A is an variable


20 is an integer literal.
Literals provide a means of expressing specific values in your program.
A literal is notation for representing a fixed ( const ) value.
A variable is storage location associated with a symbolic name (pointed to, if
you'd like).
In any programming language a Literal is a constant value, where as identifiers
can change their values
https://www.quora.com/What-is-Java-Literals
https://www.quora.com/What-are-Literals-in-Java

concatenation
con--with, together
caten-- chain
chain together

string
format
form--shape
at--addition
make some changes in shape
https://app.pluralsight.com/player?course=java-fundamentals-language&author=jim-
wilson&name=java-fundamentals-language-m9&clip=1&mode=live

length-- https://www.javatpoint.com/java-string-length
valueOf- https://www.javatpoint.com/java-string-valueof
concat-- https://www.javatpoint.com/string-concatenation-in-java
replace- https://www.javatpoint.com/java-string-replace
toUpperCase https://www.javatpoint.com/java-string-touppercase
toLowerCase https://www.javatpoint.com/java-string-tolowercase
trim https://www.javatpoint.com/java-string-trim
split https://www.javatpoint.com/java-string-split
charAt https://www.javatpoint.com/java-string-charat
substring https://www.javatpoint.com/substring
contains https://www.javatpoint.com/java-string-contains
endsWith https://www.javatpoint.com/java-string-endswith
startsWith https://www.javatpoint.com/java-string-startswith
indexOf https://www.javatpoint.com/java-string-indexof
lastIndexOf https://www.javatpoint.com/java-string-lastindexof

CompareTo and-------https://www.javatpoint.com/java-string-compareto
compareToIgnoreCase---
https://www.tutorialspoint.com/java/java_string_comparetoignorecase.htm
check to see if one string is greater than, equal to, or less than another string
based on the Unicode character sequences.

IsEmpty -------------https://www.javatpoint.com/java-string-isempty
tells us whether we have a zero-length string

equals and -------https://www.javatpoint.com/java-string-equals character by


character comparision
equalsIgnoreCase -----https://www.javatpoint.com/java-string-equalsignorecase
obviously check for equality.
Equals checks to see that we have the exact same character sequence in two
strings.
EqualsIgnoreCase does the same thing, but ignoring the case,

intern
The intern method gives us back a canonicalized reference of a string value.
when you call the intern method on a string value, it will always return back the
same exact string object for a given string value
the intern assures that two strings with the same value will reference the exact
same object.

String Equality last secs

toString is the one we use to get the string representation of a class.

StringBuilder provides us with a mutable string buffer,


providing us with an efficient way to manipulate strings.

capacity()
append()
insert()

append, which lets us add new content to the end of the StringBuilder,
insert, which gives us the ability to add new content within the body of the
StringBuilder.
capacity says how much space is allocated, length says how much is in use.

classes also have overhead. Every class instance has a certain amount of memory
that's always taken up just by the fact that it's a class, and that's before
it even has its own specific values inside of there

data types---6lec primitive 4.05

String and Wrapper class both have valueOf


method

String to primitive pars- save


used it if you want primitive value from string
toBinaryString
that lets us get a string back with the binary representation of an instance.

bitCount that lets us see the individual bit values in an instance


https://www.javatpoint.com/java-integer-bitcount-method

isInfinite https://www.javatpoint.com/java-double-isinfinite-method
isNAN not a number https://www.javatpoint.com/java-double-isnan-method

isDigit https://www.javatpoint.com/post/java-character-isdigit-method
Check whether a particular codePoint is a digit or not.

isletter https://www.javatpoint.com/post/java-character-isletter-method

Static final fields create, basically, named constants


And a static final field cannot be changed in any object instance.
Its value is actually tied to the class itself
We use this most commonly when we're trying to avoid what we often call
magic numbers where we don't like to put literal numbers inside of our code.

Enumeration types
allow us to define a type that has a list of valid values.

string-->primitive
use parseXX method
like Double.parseDouble("")

type-->string --use toString


valid for enum also

https://www.quora.com/Can-you-explain-Javas-error-and-exception-hierarchy

e.getMessage
The getMessage method gives us back the appropriate message for that exception.

e.printStackTrace()
we can even print out a stack trace showing exactly what went wrong.

BufferedReader provides an efficient way to read content.

FileReader is a built-in class that takes care of the details of reading content
from a file.

BufferedReader is something that adds some buffering on top of that to make reading
from a file more efficient.
It also provides some helper methods.

https://stackoverflow.com/questions/7376647/what-is-the-difference-between-javas-
bufferedreader-and-inputstreamreader-class

any error that occurs, that inherits from this class Error,
is generally one we don't have to think about too much in our code
because it generally represents some kind of problem directly inside
the Java virtual machine. So because of that, we don't really handle
those very often. An example of one of these might be like a linkage error.
A linkage error occurs when you try to load a class, and it's not able
to load that class up for some reason

Now the errors that we tend to interact with much more inherit from a class
Exception

Generally speaking, those classes that inherit from RuntimeException represent


errors in your program.
Not always, but very commonly.

An example of one of those might be a null pointer exception. So you're trying to


use a reference
variable that you never assigned to, right? So that's kind of a programming error.

area where we work most commonly are the classes that inherit more directly from
the Exception class,
and these are the things we want to actually watch out for in our programs.

eg
IOException where you're trying to interact with a file and you're not able to,

Now these exceptions on this side here are so important that we actually handle
them correctly.
They're considered checked exceptions. A checked exception means that the compiler
actually looks,
and anytime one of these exceptions is thrown, the compiler looks to see if you
actually handled it.
If you do not handle a checked exception, the compiler will raise an error.
In other words, it won't let you build your program. So you have to handle all
checked exceptions.

Now the exceptions here under RuntimeException are considered unchecked exceptions
meaning that you
can handle them, but the compiler doesn't require that you do. So even if the
compiler knows that it's
possible for that exception to be thrown, if you don't handle it, it's not going
to raise an error.
The way you can tell an unchecked exception from a checked exception, any
exception class that
inherits from RuntimeException is considered an unchecked exception.

Any class that inherits from Exception but not RuntimeException is considered a
checked exception. Now the virtual machine-related errors,
those are treated as unchecked exceptions. In other words, the compiler does not
require that you handle those.

When an exception occurs, the Java environment will start testing your catch blocks
starting at the top and walking down each one.

The first catch block that it encounters that is assignable for this exception is
used. And what we mean by assignable is that
the catch block handles an exception that is either the type of the exception
thrown or the base class of the type of exception thrown.

Now because a base class can satisfy the catch statement, we want to make sure our
catch blocks start with the most specific
exception types first and get more general as we go down
IOException, a problem interacting with a file, and there might even be a
FileNotFoundException if I try to open a file that doesn't exist.

So far, we've been looking at how exceptions work within a specific block of code.
Let's look now how they work when we call down from multiple methods

we know, whenever we use methods in a computer program, it works with a stack.


So methodA gets a spot on the stack, and it takes up some space on that stack.

https://www.quora.com/In-laymans-terms-what-is-the-difference-between-the-heap-and-
the-stack-in-JAVA
https://www.quora.com/Why-method-area-and-heap-area-both-are-sharable-in-java
https://www.quora.com/How-and-where-are-methods-stored-in-Java
https://www.quora.com/Why-primitive-instance-variables-are-stored-in-stack-and-
reference-variables-objects-stored-in-heap-in-computer-memory-Like-how-was-this-
logic-thought-to-store-one-in-stack-and-other-in-heap-in-languages-like-net-c++-
java
https://www.quora.com/How-and-where-are-methods-stored-in-Java
https://www.quora.com/Java-If-we-create-an-object-in-a-method-will-the-object-be-
stored-in-the-stack-or-in-the-heap
https://www.quora.com/What-is-the-reason-local-variables-are-stored-in-stack
https://www.quora.com/If-Java-objects-are-stored-on-the-heap-memory-do-the-methods-
of-a-particular-object-also-reside-on-the-heap-memory-and-not-the-stack-memory

D does something that throws an exception. So now that exception occurs, and now
something has
to try to handle that exception. So what happens is the system starts trying to
see if it can
be handled. Since methodD doesn't handle it, it went to start looking up the call
stack to find
some code that can actually handle this exception.

D does something that throws an exception. So now that exception occurs, and now
something
has to try to handle that exception. So what happens is the system starts trying to
see if
it can be handled. Since methodD doesn't handle it, it went to start looking up the
call stack
to find some code that can actually handle this exception.

Well, remember here in methodA we put that try/catch in place. Well that catch
puts a marker
on the stack. So what happens now is that Java looks up the call stack, and when it
finds that
marker, it says oh, you can handle this exception. The call stack is cleaned up,
and then control
is passed to that catch block. So that means then, of course, is that exceptions
propagate up the
call stack, meaning that they can actually cross method boundaries.

One is it can catch the exception, but it doesn't have to catch the exception.
But if it doesn't catch the exception, then it must document that that exception
might occur.
The way that's documented is that a method can have a throws clause on it, and that
throws clause
needs to list any checked exceptions that might occur within that method that it
doesn't handle
So any try/catch they put in place there, they're going to catch the exceptions
that are defined on
Flight's implementation of addPassengers. We want to make sure that our derived
class doesn't start
throwing exceptions that the user of our class didn't know they were responsible
to handle.

In addition to being able to handle exceptions as we've done up until now, our code
can actually
throw exceptions as well, and that would just be in any case where we want to
signal that an error
had occurred. So we might throw an exception because our code has identified
something wrong with
the data we're working on, or it might even be that our code has caught an
exception and wants to
throw a different exception to provide more information.

idea of tying one exception to another is very fundamental to the exception classes

All the exception classes have a method called initCause that will allow you to
associate an exception with an instance of another exception

But this idea of associating exceptions together is so fundamental that many


exception classes
actually provide a constructor that will accept the other exception so you can
actually create
the new exception and associate the original all in one step.

in most cases, you're going to want to use one of the existing exception types.
But if you really have a situation where you've got something you need to provide
information
on that doesn't really fit one of the existing exceptions, you can define your own.

ou'll generally want to have at least two constructors. You'll have one constructor
that
accepts whatever the required detail is. That may be a simple string message. It
may be
some meaningful fields. You'll generally also want to have another constructor
that accepts
that same detail along with an originating exception, again, so that if this
exception's thrown
in response to a different exception, they can be tied together.

And you can, of course, have more constructors than that if you want to. You can
have a no-argument constructor,
you can have whatever you need, but you'll generally have at least these two.

e.getCause, and that


checks to see if there's a cause associated with this, which is the other
exception.

Type imports provide a way for us to tell the compiler how to map simple type names

to qualified names. We do that using the import keyword. Now one thing I want to
note
is that the keyword import may kind of give you the sense of direction of kind of
loading
something in, and that's not what import does. Import is just a mapping for the
compiler.

import on demand
it allows the compiler to map in all the types from within a package.

a package is generally a group of related types, and those types will provide some
kind of related functionality.

By working with packages, our software gets built into a predictable structure, and
that predictable structure simplifies this idea of distribution

Archive files allow us to put that folder structure into a file, and these are
commonly known as JAR files.

In addition, the archive file can optionally include

a manifest,
and that manifest provides information about what's going on inside that archive.
And basically, it's just a bunch of name value pairs,

artifacts are other things you can produce from the project
A JAR file is considered an artifact in IntelliJ.

java -jar name.jar

JAR files follow the standard ZIP file format

JAR file really is just a ZIP file with the addition of that manifest.

So we can have types and members that are visible inside of the package, but not
outside of the package so they can provide support for the capabilities of that
package without being directly usable on their own.

an interface is a type that defines a contract. The key difference between an


interface
and a class is that interfaces do not provide any implementation; they simply
provide the contract

when you implement the interface, the type that you pass in doesn't have to be the
same type as the class that's implementing it.

Now the constants we put on an interface are always considered public, final, and
static.
We don't have to use those keywords, but they're treated that way. What that means
is that
any constant you associate with an interface has the same value for all
implementers of the
interface. There's no concept of a per-instance constant in interfaces. It's
always interface-wide,
or true for all implementers of that interface

that ability to take a problem, abstractly model it in terms of its individual


pieces, model the contract to
fulfill those pieces as an interface, and then you can very easily just build
implementations of the interface
that focus on a very specific set of work. And then you can leverage a lot of that
existing work that you've
already done to get very powerful results with only a little bit of incremental
work each time.

static initialization blocks, the ability to do one-time type initialization.

particular type of nested type called

inner classes
where we actually can have the nested class's instance automatically associated
with an instance of its enclosing class.

anonymous classes,
the ability to declare and create a class all at one time.

There are times in our applications where we need to do some kind of work to
prepare a class before we use it,
and that's where static initialization blocks come in.

instance initialization blocks automatically executed before any of your


constructors.

Well, static initialization blocks execute before you actually even start using
the type.
You can kind of think of those as type initializers.

So these static initialization blocks are this really powerful capability that
takes care of initializing our classes prior to their first use with no special
calls on the part of the user.

nested type actually has visibility of private members of its enclosing type

you can also have a nested class that is protected, being that it would only be
accessible by classes
that inherit from its enclosing class.

nested type
2 parts
1part
for structure and (want to structure its naming relative to another class).
We could even kind of create the name of one class to be structured inside of
another.

scoping(make the type only usable in certain scenarios). scoping where we can limit
who can access the type

In this case, there's no special relationship between instances of the nested class
and instances of the enclosing class.
It's really because you want to make the type only usable in certain scenarios or
you want to structure its naming relative to another class

using nested classes as a mechanism for providing structure and scoping.


RewardProgram is a nested class that's
marked as static, so its name was scoped within the Passenger class.

inner classes.
We can get a much closer relationship when we nest one class inside of another.
There's a concept called inner classes.

you actually have a class who each instance of which is associated with an
instance of its enclosing class,
so there's just kind of an implicit relationship between instances.

the FlightIterator actually has two this references. It has the traditional this
reference, the ability to access its own members,
but it also has a Flight.this reference, which allows it to access the members of
the instance of Flight in which it was created.

this power of inner classes. By simply declaring FlightIterator as a class that's


nested inside of another class and not marking
it as static, each time we create an instance of FlightIterator, that
FlightIterator instance is automatically associated with the
instance of the Flight class in which it was created.

java provides the ability to create anonymous classes. With anonymous classes,
rather than use the class keyword
to go ahead and give a class a name, to give its declaration, then later go off
and create it, with anonymous classes,
we're able to declare our class as part of the class's creation.

they're useful for are cases where you want to


implement an interface or
extend a particular class generally
to provide some specific solution, something you're not generally going to use
throughout your application,
but to solve a particular problem.

We create an anonymous class as if we're constructing an instance of the interface


or base class that we want to extend.

Well that FlightIterator class is not used anywhere else in our program except
within this one method, Iterator.
So this is actually a great chance for us to use an anonymous class to kind of
further make our code a little bit more concise

So anonymous classes allow us to avoid the need to go off and declare these bunch
of classes and give them names
that we're only using in one place. Instead, right here where we need it, we take
care of the entire job of declaring
the class and creating it.
links
1.https://www.oracle.com/technetwork/articles/java/index-jsp-135444.html
2.https://stackoverflow.com/questions/415687/why-are-local-variables-not-
initialized-in-java good
3.https://stackoverflow.com/questions/19443524/why-java-is-asking-to-initialize-
the-variables-when-it-is-local pure answer must read can skip others
This is a problem with what the compiler can know about.

In the case of the Main Method, the compiler knows for sure that the variables have
not be initialized.

But in the case of the printTest methodwhich is a method of a class , the compiler
does know that
there could be some other method (or same package class) which initialized the
class variables before using it

5.https://stackoverflow.com/questions/1560685/why-must-local-variables-including-
primitives-always-be-initialized-in-java pure gold i like it
6.https://stackoverflow.com/questions/42269305/why-the-local-variables-can-not-be-
initialized-with-default-values

7.https://blogs.msdn.microsoft.com/ericlippert/2009/10/12/absence-of-evidence-is-
not-evidence-of-absence/ you cant skip this plz plz
compiler is not that sophisticated to know whether a variable is definitely
initialize so local variable must be initilize to avoid error/bug
so how compiler knows whether we actually asssign value before use ---compiler
assign memory area equal to data type so while using that variable it
enforces rule value must be put before use.
but in case of class variable same case but one caveat is if we let user to
initialize it can be overridden by constructor so its better to
use default zero value to avoid error and overriddden value

8.https://softwareengineering.stackexchange.com/questions/355059/how-are-variables-
stored-in-a-language-compiler-or-interpreter
9.https://stackoverflow.com/questions/1560685/why-must-local-variables-including-
primitives-always-be-initialized-in-java imp
10.https://stackoverflow.com/questions/1542824/initialization-of-instance-fields-
vs-local-variables/1542851#1542851 imp
11.https://stackoverflow.com/questions/29967741/what-happens-in-memory-if-we-just-
declare-a-variable-without-initialization-in-j
12.https://www.quora.com/How-does-JVM-allocate-memory-during-the-execution-of-the-
Java-program/answer/Aaryan-Verma-15
13.https://www.artima.com/insidejvm/ed2/jvm2.html read until page 3
14.http://i.stack.imgur.com/NDD6E.jpg not done

https://bit.ly/ps

reference jim wilson


1.https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.3
2.https://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html
3.

Potrebbero piacerti anche