



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This study tool is about Programming Language focusing on basic programming languages
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




● While working under calling process, arguments is to be passed. ● These should be in the same order as their respective parameters in the method specification. ● Parameters can be passed by value or by reference. ● Passing Parameters by Value means calling a method with a parameter. ● Through this, the argument value is passed to the parameter. public class swappingExample { public static void main (String[] argos) { int a = 30; int b = 45; System.out.println (“Before swapping, a = “+ a +” and b= “+b); swapFunction(a,b); System.out.println(“\n*Now, Before and After swapping values will be same here * : ”); System,out.println (“After swapping, a = “+a+” and is “+b); } Public static void swapFunction (int x, int y) { System.out.println(“Before swapping(Inside), a= “+ a +” b = “+ b); Int z= x; x=y; y=z; System,out.println (“After swapping Inside), a = “+a+”b = “+b); ● Write a Java method to display the middle character of a string. ● If the length of the string is odd there will be open middle character.
● Access modifiers ● Non-access modifiers ➢ ACCESS MODIFIERS