| Ask a Question | Answer a Question! | 

 Submitting your question... 
 
 
ResFinder - Thousands of Practice Papers
| what is the use of math.rint() please give an example also |  | 
| asked by Hemant Dangi (hemant83) 7 years ago | 
| 1 | 
| WAP to input a word and remove the consecutive repeated characters by replacing the sequence of repeated characters by its single occurance
Sample Input:Jaaaaaavvvvvvvvaaaaaaaaa
Sample Output:Java
Would this program be accepted?
import java.util.*;
public class Q8
{
    static void main()
    {
        Scanner ob=new Scanner(System.in);
        System.out.println("Input String:");
        String s=ob.nextLine();
        s=s+"*";
        int i;int j;
        for(i=0;i<s.length()-1;i++)
        {
            char ch=s.charAt(i);
            if(ch==s.charAt(i+1))
            continue;
            else
            System.out.print(s.charAt(i));
        }
    }
} |  | 
| asked by Siddhant Joshi (siddhant94) 7 years ago | 
| 3 | 
| Write the output for the following:
String s="Today is Test" ;
System.out.println(s.indexOf('T'));
System.out.println(s.substring(0,7) + " " +"Holiday");
According to me, the answer should be:Today is Holiday.
But the marking scheme says that it is:Today i Holiday [OR] Today Holiday 
Pls explain which is correct, and WHY TF are two answers being accepted? |  | 
| asked by Gargie D'souza (gar_d02) 7 years ago | 
| 5 | 
| Can someone give me the order of logical, relational, and arithmetic operators? |  | 
| asked by Pavan K Srinivasan (throwaway) 7 years ago | 
| 1 | 
| Is function call by reference there in the syllabus? will the icse instruct to write the programmes using only call by reference method? |  | 
| asked by Sameed Hussain (sameed) 7 years ago | 
| 1 | 
| Why is a class known as composite data type? |  | 
| asked by Niraj Gupta (solution86) 7 years ago | 
| 3 | 
| __This program is for finding automorphic number ....but it is not working on bluej.....plz tell what's incorrect??__
import java.util.*;
public class Main
{
	public static void main(String[] args)
	{
		
		Scanner input = new Scanner(System.in);
		System.out.println("enter number");
		
int n=input.nextInt();
int r;int s=0;
int sq=n*n;
int t=sq;
int c=1;int o=0;
while(t!=0)
{
	r=t%10;
	o++;
	t=t/10;
}
int counter=0;
for(r=sq%10;sq!=0;sq=sq/10)
{
counter++;
	s=s+r*c;
	c=c*10;
	if(s==n)
	{ System.out.println("auto");
	break;
	}
	else if(counter==o)
		System.out.println("not");
	
}
		} 
} |  | 
| asked by Fire Bird (firebird) 7 years ago | 
| 2 | 
| Write a program to accept numbers in a single dimensional array of size ‘N’. Create another string array of size ‘N-1’ to accept valid mathematical symbols like (+, -, /, %, *…). Calculate and display the result by performing the operations by using the symbols stored in the string array on the values stored in the integer array.
Example: 
 
int Arr[]={1,2,3,4}
String Sym[]={“+”,”/”,"*”} 
The result is 4. ((1+2)/3)*4 
HELP!! |  | 
| asked by Shreya Bhagat (hermione02) 7 years ago | 
| 1 |