Wednesday, 7 September 2016

Why String is Immutable or Final in Java?

Immutable meaning :  cannot be changed.
JVM allocates the memory into parts, one is stack (for execution purpose) and the other is heap (for stoning objects).  And in heap JVM allocates some memory especially for string literals called as String constant pool.
String objects are cached in string pool. And these objects are shared between multiple clients. So there is a risk of operations made by one client effects the other clients too.
Reasons:
For security:   in the sense we pass the hostname, password as string as parameters. There is chance of changing these values if string is mutable.
Explanation:
When a string is created, an object is created inside heap memory as a string pool. 
Ex: string s1=”hello”;

If we create another string s2=”hello”,  s2 is referenced to value s1 is referencing, but when we change the value of s2 a new object is created and s2 is referenced to that, this happens because string is immutable, if string is not immutable then change s2 will also change the value of s1 which is not desired.

Saturday, 21 February 2015

Andriod Versions


Android versions are following an alphabetical order in their naming as follows:

Astro 1.0
Bender 1.1
Cupcake 1.5
Donut 1.6
Eclair 2.0
Froyo 2.2.x
Gingerbread 2.3.x
Honeycomb 3.x
Ice cream sandwich 4.0.x
Jellybean 4.3
KitKat 4.4
Lollipop 5.0.x 
Marshmallow


Saturday, 23 August 2014

Heap Memory Vs Stack Memory

Heap memory:
What-   it is used by jvm to store all the objects created in a project.
Heap memory is divided into three generations-young , old, permanent area of heap
First object gets created in young gen space after it gets referenced to null it moves to old gen space
Permanent area of space is used to store meta data related to classes and methods.
If there is no memory JVM will through Java. lang.outofmemoryerror
There are two types of out of memory errors
1. lang.outofmemoryerror.heap memory
2. lang.outofmemoryerror.perm generation
To increase the heap memory by the JVM options as shown below
Xms   <start size>   xmx <Max size>
Permanent gen memory error can be caused if we have too many classes or huge number of strings in the project
It is also called due to memory leaks through class loaders in application servers
Different
Permanent area of space can be increased by below JVM options
Xx:permsize and xx:maxpermsize

Stack memory:
It is small block of memory used by JVM to store function classes and local variables.
Each thread will have their own stack memory which can be specified using -xss JVM option.


Friday, 22 August 2014

Earn Money Online

Click the link below:
http://www.get-paid.com/index.php?ref=mahesh007

Get paid is a reliable website for Earning money(in dollars,for 500 coins = 1$) online through simple tasks,completing offers,watching videos,completing surveys,playing and challenging Games.....

To get money credited into your accounts you need :

1. PayPal or Payza or We money Account
  a. For creating PayPal account you need bank account to be associated with paypal account

2. You just need to enter only email id associated with PayPal in this website which serves as
     account number.(no need to give any bank details in this website,bank details goes with PayPal
     so it is secure)

(Note: whatever the country you are in, the dollars will be converted to your bank account currency,it is done by PayPal automatically)

Wednesday, 25 September 2013

IELTS MARKING PROCEDURE

IELTS MARKING SCHEME:

Overall Band score is calculated as:
                                                  SUM
           AVERAGE     =            --------------      
                                                     4
SUM =   listening+ reading + writing + speaking

EX:  L – 6.5    R – 6.0    W - 5.5    S – 6.0

SUM = 6.5+6+5.5+6.5          AVERAGE = 6.125          Overall band score = 6.0

1.       If AVERAGE is 6.5             Overall band score  is  →   6.5
2.       If AVERAGE is 6.375         Overall band score  is  →   6.5
3.       If AVERAGE is 6.25           Overall band score  is  →   6.5
4.       If AVERAGE is 6.125         Overall band score  is  →   6.0
Download pdf''

5.       If AVERAGE is 6                Overall band score  is  →   6.0
6.       If AVERAGE is 5.875         Overall band score  is  →   6.0
7.       If AVERAGE is 5.75           Overall band score  is  →   6.0
8.       If AVERAGE is 5.625         Overall band score  is  →   5.5
HERE the average score is rounded to the nearest band score

ILETS listening marking scheme (academic) :( L)
Individual Band score
score out of 40
4
10-12
4.5
13-15
5
16-17
5.5
18-22
6
23-25
6.5
26-29
7
30-31
7.5
32-34
8
35-36

IELTS reading marking scheme (academic) :( R)
Individual Band score
score out of 40
4
10-12
4.5
13-14
5
15-18
5.5
19-22
6
23-26
6.5
27-29
7
30-32
7.5
33-34
8
                          35-36

Writing :( W)      Depends on following factors
·         Lexical resource
·         Grammatical range
·         Accuracy
·         Coherence
Speaking :( S)    Depends on following factors:
·         Fluency
·         Pronunciation
·         Accuracy
·         Grammatical resource