Posts

Interview Important questions.

Image
 AXL Service public class HelloWorld{      public static void main(String []args){         String s1="myString";         String s2=new String("myString");         System.out.println(s1.equals(s2));         System.out.println(s1==s2);          //earthmatic operator      } } what is the output of both two things true false 2. implicit wait condition me yadi 10 second ka time diya or wo webelement 5 second me hi fullfill ho gaya to kya hum pure 10 second wait karenge ya 5 second dekar aage barh jayenge or same condition yadi explicit wait ke sath ho to kya karenge. 3.  next sequence batayen. 1, 5, 14, 30, 55, 91, ? A 130 B 140 C 150 D 160 Easy Solution Verified by Toppr Correct option is B 140 The pattern is + 4, + 9, + 16, + 25, + 36, ..... i.e. +  2 2 , + 3 2 , + 4 2 , + 5 2 , + 6 2 , . . . . . So, missing term =  9 1 + 7 2 = 9 1 + 4 9...

#Prime #Numbers

 package javaprogram; import java.util.Scanner; public class PrimeNo {     public static void main(String[] args)     {         // TODO Auto-generated method stub         int count;         int num;         System.out.println("prime numbers list from 1 to 1000");         for(int j=1;j<=1000;j++)         {             count=0;             num=j;             for(int i=1;i<=num;i++)             {                 if(num%i==0)                 {        ...

#Factorial of #Numbers

 package javaprogram; public class FactorialOfNumber {     public static void main(String[] args)     {         int num;         for(int j=1;j<=1000;j++)         {             System.out.println("factorial of "+j+" is:");             num=j;             for(int i=1;i<=num;i++)             {                 if(num%i==0)                 {                     System.out.print(i+"\t");                 }        ...