import java.util.*;

import Jama.Matrix;

import java.util.*;

import Jama.Matrix;


public class Suceses
{
   public static void main(String[] args)
   {
   System.out.println("회전할 각도를 입력하시오 :");
   Scanner a = new Scanner(System.in);
   int kakdo = a.nextInt(); 
   System.out.println(a);
   double rad = (kakdo*Math.PI)/180;
   int x= 50;
   int y= 30;
    Matrix A = new Matrix(new double[][]
          {
          {Math.cos(rad),Math.sin(rad)},
          {-((Math.sin(rad))),Math.cos(rad)}
          }); 
   Matrix B = new Matrix(new double [][] {{x},{y}}); 

   Matrix C = A.solve(B);

   System.out.println(A);
       A.print(9, 6);
   System.out.println(C);
       C.print(6, 9);

When I run this code. I have some problem. problem sentence is "java.util.Scanner[delimiters=\p{javaWhitespace}+][position=2][match valid=true][need input=false][source closed=false][skipped=false][group separator=\,][decimal separator=.][positive prefix=][negative prefix=\Q-\E][positive suffix=][negative suffix=][NaN string=\Q?\E][infinity string=\Q∞\E]"

Please somebody help us .....!!!!!!

Recommended Answers

All 4 Replies

Line 13 you print the Scanner object a
The output you see is the description of your scanner object.
I guess you wanted to print the user's input, kakdo?

i think you entered negative integer value or string value

No. That would have thrown an InputMismatchException. His output is just the result of calling toString on a Scanner object when trying to print it.

Nuruhee,

Can you be clearer as to your objective and what you need the code to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.