Skip to main content

Posts

How to transfer from one activity to another in android

How to transfer from one activity to another in android In android, if you want to transfer the user from your source activity ie, the main activity or the activity you are currently working on to another activity we can simply use the intent property of the android. Syntax:- Intent intent = new Intent(MainActivity.this,SecondActivity.class); startActivity(intent); In this example:- MainActivity :- This can be defined as the source activity or the activity on which you are currently working. In other words, it can also be defined as the activity from where you want to redirect the user to another activity of your application. SecondActivity :- This can be defined as the destination activity. In other words, it is the activity where the user is redirected after the button click from the first activity ie, the MainActivity . Note:-  The first activity that is passed is always passed as the context ie, Name.this. The Second activity that is ...

Threat wandering on Amazon Rainforest

Threat wandering on Amazon Rain forest Amazon Rain forest is the world's largest rain forest in the world and situated in Brazil and extended to Columbia Peru and other South American countries , famed for its biodiversity. Its crisscrossed by thousands of rivers,including the powerful Amazon. The area in which the Amazon Rain forest is spread is about 5.5 million square km. Amazon rain forest is said to be the lungs of the planet earth which produces about 20% of the earth total oxygen that is consumed on the planet earth.  Since last few days there is huge threat wandering on lungs of the planet IE the Amazon rain forest. The forest is covered with the intense and huge fire and burning continuously from days. Fire is so huge that it can turn the rain forest into the Savannah in few more days which will be the huge loss to the planet earth as it will not able to fulfill the amount of required oxygen by the people residing on it. The city of Roraim...

Output for the program "10"+20+30

Output for the program "10"+20+30 If we add a string literal before any other datatype such as integer or float etc then the compiler will treat all other datatypes as a string and the output that will be printed is  102030 The compiler will simply concatenate the string and will print the output. But on the other side, If we add the integer values before and the string literal later on then the compiler will add both of the integer values and concatenate the string literal. In this case, the output that will be printed by the compiler is 5010 .

Difference between px,dip,dp and sp in Android

Difference between px,dip,dp and sp in Android MEANING px   -> It stands for pixel and has a same meaning to the resolution of the screen density. it corresponds to the actual pixel in the screen. dip ->Dip and dip both are one and the same thing.It stands for density independent pixel.It is dependent on physical intensity pixel of screen. sp  It stands for scaled pixel. USAGE px It is used with the images to resize the image.used to fit the image to screen and change the size of the image.

What is Java

     What Is JAVA?    Java is a General Purpose, platform independent, Concurrent, very Fast, and most Important Object Oriented  Programming  Language  General Purpose :  Implies That It's Not Constrained To One Particular Domain and it can be Used to a wide variety of applications. Object Oriented :  It helps  to interact with more real-life scenarios in a more natural way.  Platform Independent: it   helps to run the java code on every platform. java mantra is write once run anywhere that is writing a program once a new must be able to run it. Concurrent Programming : which is nothing but multithreading Andits enables programs to perform multiple activities at the same time is also very fast and it is almost indistinguishable.  These are the some core attributes of java which make the java really a solid and very reliable and a complete programing language. it i...